Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Mark Morgan Lloyd
On 23/08/18 10:00, Martin Schreiber wrote: On Thursday 23 August 2018 11:11:34 Bo Berglund wrote:> On Thu, 23 Aug 2018 09:00:07 +0200, Bo Berglund>> 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

Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Martin Schreiber
On Thursday 23 August 2018 11:54:14 Martin Schreiber wrote: > > I don't think that can be done reliably in user space. > As Alexander writes, the right way to do such a task is to use a hardware timer in capture mode. I don't know how difficult this is on RPi. Martin

Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Martin Schreiber
On Thursday 23 August 2018 11:11:34 Bo Berglund wrote: > On Thu, 23 Aug 2018 09:00:07 +0200, Bo Berglund > > 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? MSEgui has

Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Alexander Hofmann
Hi, I recently built a Weather-Station using an RPi and Lazarus/FPC, but: anything that's not I2C or SPI (or otherwise supported within the RPi hardware) is IHMO hard to realize. I went on and used an AVR (Arduino) to interface the DHT11, and hooked that up to the Pi with UART (just before

Re: [fpc-pascal] Branch table

2018-08-23 Thread Marco Borsari via fpc-pascal
On Thu, 23 Aug 2018 09:32:58 +0200 Florian Klämpfl wrote: > Am 21.08.2018 um 11:42 schrieb Marco Borsari via fpc-pascal: > > Il 20/08/2018 17:32, Giuliano Colla ha scritto: > > > >> On the Intel architecture you cannot perform pointer arithmetic as if a > >> pointer were just a number. > >> A

Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Bo Berglund
On Thu, 23 Aug 2018 09:00:07 +0200, Bo Berglund 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

Re: [fpc-pascal] Branch table

2018-08-23 Thread Florian Klämpfl
Am 21.08.2018 um 11:42 schrieb Marco Borsari via fpc-pascal: > Il 20/08/2018 17:32, Giuliano Colla ha scritto: > >> On the Intel architecture you cannot perform pointer arithmetic as if a >> pointer were just a number. >> A pointer is composed of two parts: a "selector" and an "offset", which >>

Re: [fpc-pascal] Reading AM2302 temp/humid sensor on RaspberryPi?

2018-08-23 Thread Bo Berglund
On Thu, 23 Aug 2018 00:33:05 -0500, R0b0t1 wrote: >Can you briefly describe its protocol? Does it look anything like >Dallas/Maxim Semi 1-wire or I2C, or is it something else? If it is >either of those the I2C or SPI peripheral likely could do it. Even if >not the SPI peripheral may work. This