(solved) Duemilanove input voltage

Hey folks,

I am running on Duemilanove and simply want to get a digital signal from some pins (D4-D7), but as soon as i attach a wire to any of the pins and send the value of digitalRead() via serial port, i get 20 times high, 20 times low, 20 times high ond so on. Even if the wire goes nowhere.

Is there something like a pull-down resistor or am i missing something else? Or is this a normal behavior in some way?

thanks. /m

Floating inputs comes up about once a week here.

simply want to get a digital signal from some pins (D4-D7),

What are you going to be connecting them to?

Some kind of pushbutton ( http://www.sparkfun.com/commerce/product_info.php?products_id=9182 ) which should pull the pin on high if pressed.

But is this a normal behavior for the board to chage the state?

pins set as input are in a high impedance state, it does not take much of anything to make them switch including just random electrical noise

yes its normal, this is why you must use pull up or pull down resistors

Ok, thanks solving this!

I searched a lot, but for some reason, i missed the pull-down resistor as a searchword. So i wasnt sure, if i maybe killted by arduino or something.


Here is a page all about it:- http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

I just read over this one: http://www.ladyada.net/learn/arduino/lesson5.html