While there isn't any reference link to the suspect documentation, I'd have to guess whether it is actually the documentation that is in error. Also checked out http://www.espruino.com/Tutorials with no luck, which is why providing links to aid those of us attempting to assist is of great benefit.
Unless Pin D2 is an absolute must, it is quite possible that the LED anode is wired to the positive rail, and the cathode to the pin, (D2?) in which case, to turn it on will require dropping voltage across it. To do so will require sending a vaild 'false' or '0' as was discovered when detailing #1 post. This may seem counter intuitive, but how the parts are wired will determine the correct code needed.
Sparkfun has some great tutorials. A simple Google search will reveal.
© Espruino, powered by microcosm.
Report a problem