| Post Reply | RetroFed Forum Forum Index » Arduino |
| Author | Message | ||
|---|---|---|---|
MapleEngineer
lemmy.ca
MapleEngineer@lemmy.caJoined: 2023-06-14 |
If your circuit is behaving weirdly, switching on when you touch a wire or move your hand over the circuit you almost certainly have a floating input. You can solve this problem with a pull-up resistor. Many AVRs have built-in pull-up resistors that you can turn on using code. In Sketch: pinMode(2, INPUT_PULLUP); In BascomAVR: Config Portb.1 = Input There's a great article at SparkFun about Pull-up Resistors. |
||
| 2 Original | |||
| Post Reply |
Back to top |