LowPowerLab Forum

Hardware support => Moteino => Topic started by: Marquis on August 31, 2020, 11:55:51 PM

Title: DigitalRead Issue
Post by: Marquis on August 31, 2020, 11:55:51 PM

I must be doing something wrong but I'm getting strange results using digitalRead. The pin is normally tied low, when the switch is closed 1.6 volts is sent to it (from a voltage divider circuit).

When I poll the pin, I get LOW all the time -even when the button is pressed. When I double check the voltage with my multimeter, it suddenly works. I get a HIGH when the button is pressed. When I remove my meter, the pin stops reading HIGH. If do an analogread, I get 504 when the button is pressed. With or without the meter attached. The result is the same.

My question - what is the meter doing that is changing the reading? And how can it be doing anything, the analogRead is always the same. Any suggestions?
Title: Re: DigitalRead Issue
Post by: Felix on September 01, 2020, 08:53:11 AM
Digital read will need more than 1.6v to read HIGH at VCC=3.3V.