Hi,
I guess this isn't really something you wanted to pay someone for? In which case it should really go on the Puck.js forum - I'll move it.
Based on http://www.espruino.com/Puck.js#accelerometer-gyro
require("puckjsv2-accel-steps").on(); var steps = 0; Puck.on('accel',function(a) { steps++; if (steps>20) LED2.set(); });
And maybe you want to reset it too when you press the button., so you can add:
setWatch(function() { steps = 0; LED2.reset(); }, BTN, {edge:"rising", repeat:true});
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
I guess this isn't really something you wanted to pay someone for? In which case it should really go on the Puck.js forum - I'll move it.
Based on http://www.espruino.com/Puck.js#accelerometer-gyro
And maybe you want to reset it too when you press the button., so you can add: