check it out, post feedback
woot
http://www.ladyada.net/learn/arduino/lesson5.html
Moderators: adafruit_support_bill, adafruit
ladyada wrote:check it out, post feedback
woot
I have the switch test code, straight from ladyada.net, the first one example in this lesson. I have a jumper from 5V to a switch, out to a 100ohm resistor, to pin 2. I get a mix of '1's and '0's. I unplug the 5V to switch it to ground. (Still getting a mix, every when there's NO POWER to the circuit). Plug it into ground. SAME THING! Any ideas at all?!?!
phil007 wrote:Will lessons 6 through 11 be online soon? I'm ordering the Arduino Starter Pack and Protoshield this week. The week during Christmas will be a good time for me to go through all the lessons.
timv wrote:I have the switch test code, straight from ladyada.net, the first one example in this lesson. I have a jumper from 5V to a switch, out to a 100ohm resistor, to pin 2. I get a mix of '1's and '0's. I unplug the 5V to switch it to ground. (Still getting a mix, every when there's NO POWER to the circuit). Plug it into ground. SAME THING! Any ideas at all?!?!
Ya gotta go Sherlock Holmes on this stuff. Whatever the line is... "When you've ruled out the impossible whatever remains, however improbable, must be the truth."
Go back to basics. If you hook a 100 ohm resistor between the port and +5 does it always read 1? If you hook it to ground does it always read 0?
If you have a problem there then either you have a problem with your Arduino, or you're actually hooking it to another port than the one you think you are, or you read-enabled the wrong port, or there's some other outside-the-box answer you haven't been considering.
If using just the resistor does give 1 and 0 as expected, then wire like the example circuit, but use a plain piece of wire to close the circuit instead of the switch. What happens then?
I can testify that it did work for me just as described, so something's not right in your setup. Simplify the experiment until you can finally trap the problem in a very small box.
magician13134 wrote:I went about as basic as you can get.... I plugged in my Arduino, NOTHING plugged into any of the pins (not even the proto shield at this point), recopied the code, compiled and uploaded, clicked 'serial monitor' and got a mix of ones and zeros.
Then I decided to do what you said, attach it to ground, so I did, clicked reset on the Arduino, and same thing...![]()
What do I do now?!

Return to Arduino Starter Pack
Users browsing this forum: No registered users and 2 guests