Shop OBEX P1 Docs P2 Docs Learn Events
led blinks — Parallax Forums

led blinks

GeojrGeojr Posts: 5
edited 2007-07-23 09:20 in BASIC Stamp
I turn on a led through the controler and it blinks. Does anyone no why?
·

Comments

  • Megaman935Megaman935 Posts: 19
    edited 2007-07-22 20:32
    old age? could you tell me your code? I may be able to help further...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Mega
    Want to know how to build your own robot?
    www.societyofrobots.com
    Need good forums for things other than programming?
    http://www.societyofrobots.com/robotforum/index.php

    Post Edited (Megaman935) : 7/23/2007 3:26:32 PM GMT
  • GeojrGeojr Posts: 5
    edited 2007-07-22 20:39
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DEBUG "Program running", CR

    HIGH 8

    END
  • Megaman935Megaman935 Posts: 19
    edited 2007-07-22 20:48
    try putting PAUSE after high for the amount of time you want it to stay.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Mega
    Want to know how to build your own robot?
    www.societyofrobots.com
    Need good forums for things other than programming?
    http://www.societyofrobots.com/robotforum/index.php

    Post Edited (Megaman935) : 7/23/2007 3:26:25 PM GMT
  • GeojrGeojr Posts: 5
    edited 2007-07-22 21:00
    The pause works. I seems that when the program ends is when this problem happens. If I am going to keep something on, should I not let the program end?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-07-22 21:23
    PBASIC Help states (emphasis mine)·--

    Just as with the SLEEP command, pins will retain their input or output settings after the BASIC Stamp is deactivated by END. For example, if the BASIC Stamp is powering an LED when END executes, the LED will stay lit after END, but every 2.3 seconds, there will be a visible wink of the LED as the output pin switches to the input direction for 18 ms.

    Update -- If you just want to turn the LED on and then leave it at that (and I won't ask why), then just lose END.
  • Megaman935Megaman935 Posts: 19
    edited 2007-07-22 21:23
    Well, you could do the FOR NEXT loop. or just GOTO

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Mega
    Want to know how to build your own robot?
    www.societyofrobots.com
    Need good forums for things other than programming?
    http://www.societyofrobots.com/robotforum/index.php

    Post Edited (Megaman935) : 7/23/2007 3:26:17 PM GMT
  • GeojrGeojr Posts: 5
    edited 2007-07-22 21:28
    Thanks PJ and Megaman
  • Megaman935Megaman935 Posts: 19
    edited 2007-07-22 21:36
    No problem- glad to help!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Mega
    Want to know how to build your own robot?
    www.societyofrobots.com
    Need good forums for things other than programming?
    http://www.societyofrobots.com/robotforum/index.php

    Post Edited (Megaman935) : 7/23/2007 3:26:10 PM GMT
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-07-23 09:20
    Geojr -

    You can also use the STOP command.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.