Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 10 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
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
what's wrong with this?
thanks
---------
seneor pic
1 Answer
7 years, 10 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 :
You will be able to see that the P0_23 is mapped to pin #15 that is named p15 (rescpect the lower case !)
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 31 Oct 2016the origin is DHT sensor(PTD4,SEN11301P); i change it to DHT sensor(PTD4,DHT22); What's the PTD4?
posted by 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 01 Nov 2016
I solve it. HAHA Thanks~~
posted by jajn HA 31 Oct 2016