4 years, 9 months ago.

DHT22 temperature&humidity problem

Hi, thanks for watching my problem. i change the sensor and use the code below https://developer.mbed.org/users/umairaftab/code/DHT-11/file/6e5d3c6e8715/main.cpp

/media/uploads/david8251/112.jpg i change the value DHT sensor(p23,SEN11301P); the DAT connect to p0.23, VCC connect to Vout 5V, GND connect to J3 the last pin22

but the putty print /media/uploads/david8251/--.png

what's wrong with this? thanks --------- seneor pic /media/uploads/david8251/123.jpg

I solve it. HAHA Thanks~~

posted by jajn HA 31 Oct 2016

1 Answer

4 years, 9 months ago.

P0_23 is not p23...

There is a difference between pinnames and pine number on the board...

In fact P0_23 is mapped to p15 according the PinNames.h header file from the mbed library concerning the LPC4088 QSB.

Try with : DHT sensor(p15,SEN11301P);

To avoid mistakes beetween pinnames and minmap you can use this doc of 4088 QSB :

https://developer.mbed.org/media/uploads/embeddedartists/lpc4088_quickstart_board_connector_rev_a.pdf

You will be able to see that the P0_23 is mapped to pin #15 that is named p15 (rescpect the lower case !)

Accepted Answer

Thanks, but it still wrong. i use this document below .HAHA http://www.embeddedartists.com/sites/default/files/support/qsb/lpc4088/LPC4088_Experiment_Base_Board_revA.pdf

i think the output of the sensor is digital. so maybe MCU needs digital input? it's right?

posted by jajn HA 31 Oct 2016

the origin is DHT sensor(PTD4,SEN11301P); i change it to DHT sensor(PTD4,DHT22); What's the PTD4?

posted by jajn HA 31 Oct 2016

can you post an picture of this sensor ?

posted by Raph Francois 31 Oct 2016

Thanks, sensor pic is in my Question

posted by jajn HA 31 Oct 2016

Which pin is the DAT should connect QAQ?

posted by jajn HA 31 Oct 2016

"the origin is DHT sensor(PTD4,SEN11301P); i change it to DHT sensor(PTD4,DHT22); What's the PTD4?"

PTD4 is an Pinname of a board. so p15 is good to use with lpc4088.

Do you have an Logic Analyzer like Saleae product ? It can help you debugging your digital in/out ports.

So you can also try with : DHT sensor(p15,DHT22);

and according to this doc, http://akizukidenshi.com/download/ds/aosong/AM2302.pdf

you must use an 5.1Komh on page 3 according to the schematics on page 4...

posted by Raph Francois 01 Nov 2016