Shop OBEX P1 Docs P2 Docs Learn Events
BadgeWX LEDs blink? — Parallax Forums

BadgeWX LEDs blink?

KerryHKerryH Posts: 2
edited 2022-04-28 04:37 in Learn with BlocklyProp

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?

2268 x 2081 - 1M

Comments

  • VonSzarvasVonSzarvas Posts: 3,439
    edited 2022-04-28 06:13

    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.

  • KerryHKerryH Posts: 2
    edited 2022-04-28 14:42

    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.

Sign In or Register to comment.