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

2018-08-24 Thread R0b0t1
On Fri, Aug 24, 2018 at 2:45 PM, Mark Morgan Lloyd wrote: > On 24/08/18 09:15, R0b0t1 wrote: >> >> On Thu, Aug 23, 2018 at 6:28 AM, Mark Morgan >> Lloyd wrote:> 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

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

2018-08-24 Thread Mark Morgan Lloyd
On 24/08/18 09:15, R0b0t1 wrote: On Thu, Aug 23, 2018 at 6:28 AM, Mark Morgan Lloyd wrote:> 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

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

2018-08-24 Thread Bo Berglund
On Thu, 23 Aug 2018 11:28:16 +, Mark Morgan Lloyd wrote: >The AM2302 datasheet suggests that it's a device to be avoided assiduously. But it works fine hooked to an ESP-07 WiFi module, which is programmed using the Arduino framework. I have a test running for several months now and it logs

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

2018-08-24 Thread Bo Berglund
On Thu, 23 Aug 2018 11:28:16 +, Mark Morgan Lloyd wrote: >The AM2302 datasheet suggests that it's a device to be avoided assiduously. But it works fine hooked to an ESP-07 WiFi module, which is programmed using the Arduino framework. I have a test running for several months now and it logs

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

2018-08-24 Thread R0b0t1
On Thu, Aug 23, 2018 at 6:28 AM, Mark Morgan Lloyd wrote: > 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

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] 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] 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

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

2018-08-22 Thread R0b0t1
On Wed, Aug 22, 2018 at 4:19 PM, Bo Berglund wrote: > I wonder if there are any demo projects around for reading the AM2302 > DHT sensor on a RaspberryPi through FreePascal? > Any links to sample code would be appreciated. > I have used it on an ESP-07 WiFi module (C language and Arduino >

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

2018-08-22 Thread Bo Berglund
On Wed, 22 Aug 2018 23:19:28 +0200, Bo Berglund wrote: >I wonder if there are any demo projects around for reading the AM2302 >DHT sensor on a RaspberryPi through FreePascal? >Any links to sample code would be appreciated. >I have used it on an ESP-07 WiFi module (C language and Arduino

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

2018-08-22 Thread Bo Berglund
I wonder if there are any demo projects around for reading the AM2302 DHT sensor on a RaspberryPi through FreePascal? Any links to sample code would be appreciated. I have used it on an ESP-07 WiFi module (C language and Arduino environment) but now I would like to get it going on an RPi using