o I took the code from the DigitalRead reference entry and tried to use it to turn on an LED using a switch (just wanted to try DigitalRead, I know I don't need to do it to use the switch). I got an LED connected to pin 12 and a switch connected to pin 7. The only time the LED turns on is when the switch is on AND my hand is nearby (not even touching, just nearby, regardless if i'm grounded with the wriststrap or not). The circuit with the switch doesn't even have to be completed; I can have one wire in pin 7 and the other in the air not touching anything; I put my hand nearby and the LED turns on.
When using a code that does not contain a digitalread value
I do not have the problem
But when I use the digitalread code, the problem occurs and when my hand is near it, it turns on the hand
What's the solution because my hand affects digitalread
remind
I have used more than 10 codes