Shop OBEX P1 Docs P2 Docs Learn Events
help me — Parallax Forums

help me

lulululu Posts: 2
edited 2005-09-18 17:20 in Learn with BlocklyProp
hi everyone.

I'm having a problem with blinking LEDs by using BS2.
I want the LEDs to blink only after switch1 is pressed, released, and then switch2 is pressed.
Is this possible? How should I make such a program??

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-18 13:27
    I would do somthing like this:

    Main:
    · DO
    ··· DO : LOOP UNTIL (Switch1 = Pressed)
    ··· DO : LOOP UNTIL (Switch2 = Pressed)
    ··· DO WHILE (Switch2 = Pressed)
    ······TOGGLE LED
    ····· PAUSE 100
    ·· ·LOOP
    · LOOP

    I will leave you to the details.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • lulululu Posts: 2
    edited 2005-09-18 17:20
    Dear Mr. Jon Williams

    Thak you so much for your reply, and it worked!!!

    I really appreciate your suggestion. Thank you!!
Sign In or Register to comment.