Help : Basic Stamp 2 Command Code/ Program Enquiry
efly
Posts: 34
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.
·
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.
bmp
331K
Comments
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