The-Cessna-172-Project-V3 icon indicating copy to clipboard operation
The-Cessna-172-Project-V3 copied to clipboard

Pin 13 Strange behavior

Open CaptainBobSim opened this issue 4 months ago • 1 comments

CaptainBobSim avatar Mar 28 '24 15:03 CaptainBobSim

This is a known thing https://docs.arduino.cc/learn/microcontrollers/digital-pins/

Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, set its pinMode() to INPUT and use an external pull down resistor.

oOblik avatar Apr 06 '24 16:04 oOblik