Page 1 of 1

DHT11 for CT-ARM

PostPosted: Fri Jun 29, 2018 12:41 am
by JayJoe
Hi,

I am having error while compiling dht library for CT-ARM. Please refer the attached files.

Thank you.

Re: DHT11 for CT-ARM

PostPosted: Fri Jun 29, 2018 8:08 am
by bengchet
Hi,

A quick fix on dht.cpp should do trick, but still need to verify the result.

CODE: SELECT_ALL_CODE
#if defined(__NUC131__)
    // 32 bit
    uint32_t bit = digitalPinToBitMask(pin);
    GPIO_T* port = digitalPinToPort(pin);
    volatile uint32_t *PIR = portInputRegister(port);
#else
    uint8_t bit = digitalPinToBitMask(pin);
    uint8_t port = digitalPinToPort(pin);
    volatile uint8_t *PIR = portInputRegister(port);
#endif

Re: DHT11 for CT-ARM

PostPosted: Sat Jun 30, 2018 2:58 pm
by JayJoe
Hi,

I have verified. Unfortunately, it's not working.

DHT TEST PROGRAM
LIBRARY VERSION: 0.1.28

Type, status, Humidity (%), Temperature (C)
DHT11, Connect error, 0.0, 0.0
DHT11, Time out error, 0.0, 0.0
DHT11, Time out error, 0.0, 0.0
DHT11, Time out error, 0.0, 0.0
DHT11, Time out error, 0.0, 0.0
DHT11, Time out error, 0.0, 0.0

I am getting these

Re: DHT11 for CT-ARM

PostPosted: Sun Jul 01, 2018 9:32 pm
by bengchet
Hi,

Right now I don't have device with me. I will try later and feedback to you. Anyway you can try the library by using digitalRead and see if result is okay.

Re: DHT11 for CT-ARM

PostPosted: Mon Jul 02, 2018 1:44 pm
by JayJoe
Hi bengchet,

I am using DHT.h library by Adafruit now and it works :D

Thanks for your reply.