Hi Ollie, thanks for you answer. Yes, my note was connected to the puck. However, I still not figure out how to use the functions to handle the puck features.
I know that I have to use Puck.write and describe the function that I wanna use in the puck and than the callback. However, I cant for example call 'Puck.on('mag',function(xyv) {' using write. Can I? I saw in examples on internet connecting through IDE that the pages call the functions of puck directly. Like
var on = false;
setInterval(function() {
on = !on;
LED1.write(on);
}, 500);
How I can use javascript like that in my code? Can I?
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 Ollie, thanks for you answer. Yes, my note was connected to the puck. However, I still not figure out how to use the functions to handle the puck features.
I know that I have to use Puck.write and describe the function that I wanna use in the puck and than the callback. However, I cant for example call 'Puck.on('mag',function(xyv) {' using write. Can I? I saw in examples on internet connecting through IDE that the pages call the functions of puck directly. Like
How I can use javascript like that in my code? Can I?
Thanks Again