Shop OBEX P1 Docs P2 Docs Learn Events
Help : Basic Stamp 2 Command Code/ Program Enquiry — Parallax Forums

Help : Basic Stamp 2 Command Code/ Program Enquiry

eflyefly Posts: 34
edited 2007-03-17 10:25 in BASIC Stamp
I would like to write a program as per attached, which connect a small LED into stamp 2 BOE, ·but no idea using which commands are the best (input/output/button/read?) , as you can see I just want to turn on or off the LED that result can be debugged from stamp.
·
1) If the switch is open, meant the LED off, LED =0 , debug “LED off”
2) If the switch is close, meant the LED on, LED =1 , debug “LED on”
·
Appreciate can give me some ideas.

yeah.gif

Comments

  • ForrestForrest Posts: 1,341
    edited 2007-03-17 10:25
    DO NOT BUILD THAT CIRCUIT - YOU WILL EITHER BURNOUT THE LED AND/OR DAMAGE THE BASIC STAMP! jumpin.gif

    LED's REQUIRE a current limiting resistor in the circuit. A 470 ohm resistor placed between the switch and the LED should work fine and won't damage the LED or the Stamp.

    Download and read Chapter 3 of What's a Microntroller for more information and a Basic Stamp program for your circuit www.parallax.com/detail.asp?product_id=28152
Sign In or Register to comment.