[fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?
Bo Berglund
bo.berglund at gmail.com
Thu Aug 23 11:11:34 CEST 2018
On Thu, 23 Aug 2018 09:00:07 +0200, Bo Berglund
<bo.berglund at gmail.com> wrote:
>
>I will need a higher resolution GetTickCount for this...
Is there in fact a way (on Linux - Raspbian) to get a tickcount with
higher resolution than 1 ms?
I need us so I can time between two events (pulse rise and pulse fall)
which are 20 to 90 us apart...
An alternate way would be to do an accurate sleep for a time between
the two limits, say 48 us, after seeing the pulse rise and then
determine the state of the I/O at that time.
If the input is 0 then the bit is zero and if it is still 1 the bit is
a 1...
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list