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.
Revision 0:a0dd84b0cbf1, committed 2021-06-18
- Comitter:
- legrandpaul
- Date:
- Fri Jun 18 13:37:12 2021 +0000
- Commit message:
- programme de capteur de temperature; ;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DHT.lib Fri Jun 18 13:37:12 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/Wimpie/code/DHT/#9b5b3200688f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jun 18 13:37:12 2021 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "DHT.h" + + +Serial pc(USBTX, USBRX); // tx, rx +AnalogIn pin_SS(A0); +DHT sensor(A0,SEN11301P); + +int erreur ; +int main(){ + + while(1){ + erreur = sensor.readData(); + if (erreur == 0) { + + pc.printf( "Temperature %4.2f ",sensor.ReadTemperature(CELCIUS)); + pc.printf( "Humidite %4.2f %%",sensor.ReadHumidity()); + pc.printf(" \n\r"); + wait(1); + } else + printf("\r\nErr %i \n",erreur); + wait(0.5); + } +} + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jun 18 13:37:12 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file