Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HP206C mbed HMC5883L DHT DS1820
T_H_air.h@50:2cbcbc06ceb6, 2018-10-08 (annotated)
- Committer:
- SBACCARI
- Date:
- Mon Oct 08 10:00:19 2018 +0000
- Revision:
- 50:2cbcbc06ceb6
- Parent:
- 46:40b6bbf6167e
- Child:
- 54:61d003e0754d
Code T_H_air finale
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| SBACCARI | 20:ee252c87a24d | 1 | #include "mbed.h" |
| MathieuM | 37:2b7e44977ed5 | 2 | #include "DHT.h" |
| MathieuM | 45:60f602ecd59b | 3 | #include "config.h" |
| SBACCARI | 50:2cbcbc06ceb6 | 4 | /* ************************ MODE D'EMPLOI ***************************************************** |
| SBACCARI | 50:2cbcbc06ceb6 | 5 | Ce fichier contient les fonction à piblier pour le capteur DHT22 |
| SBACCARI | 50:2cbcbc06ceb6 | 6 | Pour la lecture des valeurs d'humidité et de la temprature un wait de 2s au minimum est necessaire |
| SBACCARI | 50:2cbcbc06ceb6 | 7 | Il est a noté que le capteurs envoie parfois des valeurs nulles, ces valeur doivent etre exclu |
| SBACCARI | 50:2cbcbc06ceb6 | 8 | airH = airHumidity(sensor); |
| SBACCARI | 50:2cbcbc06ceb6 | 9 | if( airH!=0){ |
| SBACCARI | 50:2cbcbc06ceb6 | 10 | pc.printf("H = %.2f pourcent \r\n", airH); |
| SBACCARI | 50:2cbcbc06ceb6 | 11 | } |
| SBACCARI | 50:2cbcbc06ceb6 | 12 | |
| SBACCARI | 50:2cbcbc06ceb6 | 13 | wait(2); |
| SBACCARI | 50:2cbcbc06ceb6 | 14 | |
| SBACCARI | 50:2cbcbc06ceb6 | 15 | airT = airTemperature(sensor); |
| SBACCARI | 50:2cbcbc06ceb6 | 16 | if( airT!=0 ){ |
| SBACCARI | 50:2cbcbc06ceb6 | 17 | pc.printf("T = %.2f \r\n", airT); |
| SBACCARI | 50:2cbcbc06ceb6 | 18 | } |
| SBACCARI | 50:2cbcbc06ceb6 | 19 | *************************************************************************************************/ |
| SBACCARI | 50:2cbcbc06ceb6 | 20 | |
| SBACCARI | 29:e050039204ab | 21 | |
| MathieuM | 46:40b6bbf6167e | 22 | float airHumidity(DHT sensor); |
| MathieuM | 46:40b6bbf6167e | 23 | float airTemperature(DHT sensor); |
