DHT11 for CT-ARM

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

DHT11 for CT-ARM

Postby JayJoe » Fri Jun 29, 2018 12:41 am

Hi,

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

Thank you.
Attachments
dht11_test.rar
(3.81 KiB) Downloaded 79 times
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: DHT11 for CT-ARM

Postby bengchet » Fri Jun 29, 2018 8:08 am

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
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: DHT11 for CT-ARM

Postby JayJoe » Sat Jun 30, 2018 2:58 pm

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
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: DHT11 for CT-ARM

Postby bengchet » Sun Jul 01, 2018 9:32 pm

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.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: DHT11 for CT-ARM

Postby JayJoe » Mon Jul 02, 2018 1:44 pm

Hi bengchet,

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

Thanks for your reply.
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 15 guests

cron