Go Down

Topic: Serial monitor infinite output (Read 2 times) previous topic - next topic

Arrch

Sounds like floating pin syndrome.

Enable the internal pull-up resistor on the pin.

Grumpy_Mike

Quote
actually, im using a device which outputs digital signals...and it is connected in pin 12 of my arduino.

And is the ground of this device connected to the ground of the arduino. If not then it floats.

zer0_JuLz

how to do that enabling the pull up resistor? sorry for the question guys T_T thanks

PaulS

Code: [Select]
  pinMode(forwardPin, INPUT);
  digitalWrite(forwardPin, HIGH); // Turn on the pullup resistor.

Grumpy_Mike


how to do that enabling the pull up resistor?


If the grounds are not connected then enabling the internal pull ups is not going to help.
You only need to enable the internal pull up if you have an open collector output on your other device.
This is written for power supplies but it applies equally to signals:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

Go Up