The gotcha you have is that the code on http://www.espruino.com/Puck.js#accelerometer-gyro uses a library, which won't get uploaded if you copy/paste that code. So what I'd say is, open the Web IDE and upload this code to the Puck (to Flash):
And then delete all this code from the IFTTT example:
connection.write("\x10reset();\n", function() {
// Wait for it to reset itself
setTimeout(function() {
// Now tell it to write data on the current light level to Bluetooth 10 times a second
connection.write("\x10setWatch(function(){Bluetooth.println('Pressed');},BTN,{repeat:true,debounce:50,edge:'rising'});\n",
function() { log("Ready!"); });
}, 1500);
});
You don't need any of that code any more because you've just manually loaded the code onto the Puck. Now you should be sorted :)
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.
In http://www.espruino.com/BLE+IFTTT there's this code, which is what gets run on the Puck:
The gotcha you have is that the code on http://www.espruino.com/Puck.js#accelerometer-gyro uses a library, which won't get uploaded if you copy/paste that code. So what I'd say is, open the Web IDE and upload this code to the Puck (to Flash):
And then delete all this code from the IFTTT example:
You don't need any of that code any more because you've just manually loaded the code onto the Puck. Now you should be sorted :)