I'm a bit confused by the Espruino documentation. Much of the code in the reference section doesn't work on the puck.js. The simple Button code didn't work due to a simple BTN vs BTN1 difference. Now I'm trying to get the RGB led to work. The code was easy enough to find on the reference site:
var led = require("RGBLed").connect([C7, C8, C9], false);
However this fails as C7..C9 are not defined. I assume this is a similar problem to my button issue (incorrect pin names). So I really have two questions:
1) How do I get the RBG LED defined and working and more generally
2) How can I get puck specific docs when the Espruino docs don't work?
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.
I'm a bit confused by the Espruino documentation. Much of the code in the reference section doesn't work on the puck.js. The simple Button code didn't work due to a simple BTN vs BTN1 difference. Now I'm trying to get the RGB led to work. The code was easy enough to find on the reference site:
var led = require("RGBLed").connect([C7, C8, C9], false);
However this fails as C7..C9 are not defined. I assume this is a similar problem to my button issue (incorrect pin names). So I really have two questions:
1) How do I get the RBG LED defined and working and more generally
2) How can I get puck specific docs when the Espruino docs don't work?