BadgeWX LEDs blink?
KerryH
Posts: 2
All,
I've been tinkering with my BadgeWX to prep for an upcoming conference this weekend, and while I'm pretty sure I have most of this figured out, I can't quite figure out how to make the LEDs blink using BlocklySolo. Any ideas on how to do this?
EDIT 1: This is what I have so far.
EDIT 2: I'm attaching a picture of what the badge does after the script loads. I know it may sound confusing that LED 0 is blue, then it skips over to LED 2 (green), then LED 3 (yellow) and LED 4 (red)...maybe that's a firmware issue with the badge itself?
Comments
To blink the LEDs you'd want a loop that changes the colors, with a pause between changes long enough for the eye to notice. Probably you'd run the loop in a new cog so it doesn't interfere with whatever else your code is doing.
As for the numbering... that seems wrong! I'd be shocked if the numbering wasn't either 0,1,2,3. Or. 1,2,3,4.
Yeah, I know the numbering seems off, but after testing the script multiple times (including cycling the power on the badge to clear the RAM) that's what it kept doing. Weird, right?
Anyway, I'll see what I can come up with for that loop you recommended.