-
• #2
Hi!
Which board are you using? Do you save just by typing
save()
after an upload, or by some other means?What you're doing looks fine. Have you tried adding blinking some of the on-board LEDs on and off to see if Espruino itself thinks it is doing something? It might be an electrical issue rather than a software one.
Also, a while back we changed to using
neopixel.write
for sending data to neopixels. What you're doing should still be fine, but if you useneopixel.write
then it's a bit more readable, as well as more portable to different platforms (like Puck.js if you ever wanted to use that). -
• #3
Hello!
Cool, I have an original Espruino (Rev 11.3b). I tried
save()
in the terminal yes. I swear this wasn't working yesterday but I think the code is on the board because when I've plugged in the micro usb the lights came on automatically. However, when I plug in a battery (9v) nothing happens. I'll update to use neopixel, thanks! And will try the on-board LEDs too! Thanks! -
• #4
No problem - how are you connecting the battery to Espruino?
The neopixel lights need between about 3 and 5v - not 9v - so if you've powered the lights off 9v too that's more than likely what's causing your problems?
-
• #5
Ahhh! That is why! Tried it with 2 AA and works great! Thanks Gordon!
-
• #6
Great, and no problem! To be honest you're probably going to get better battery life & performance with 3xAA batteries - that'll be around 4.5v which should be spot on for the LED strip.
I'm using a string of LED lights and creating various 'modes' I wan't to change to when clicking button 1. All works fine, but when I attach a battery everything freezes. Then when I try and save, then reattach to power nothing happens.
What I need is a way for the battery to be attached and functionality to remain. I'm looking at documentation but getting confused. I am a Noob with this! Thanks in advance!