I made a simple circuit and i am using pins 396 to read an input. The input comes from the 5v rail from the j21 header and what im doing is reading a signal until it reads a low level. I also measured with an oscilloscope that my circuit is behaving properly so the voltage starts around 4.6v which is a high and it takes a certain time to reach a low signal (about 1.7-1.8v) I am polling a read call every 5 seconds
However the results are inconsistent and as follows:
the correct time (measured by the oscilloscope) are the 241 and 247 ms readings but somehow the GPIO is reading a low voltage even at 2.5ms where the voltage is actually over 4v
Is there a reason for this behaviour?