Afif JEBALI
/
emeteur
ProjetSE_Emetteur
Revision 0:c65715546ba8, committed 2019-10-15
- Comitter:
- 3521456
- Date:
- Tue Oct 15 12:13:52 2019 +0000
- Commit message:
- ProjetSE_Emetteur;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AM2320.lib Tue Oct 15 12:13:52 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/yasuyuki/code/AM2320/#766868b34d56
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 15 12:13:52 2019 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" +#include "AM2320.h" + +Serial ant(D1, D0); //tx, rx +AM2320 cap(D4, D5); +//Serial pc(D5, D4); +char temp[4]; +int s = 0; + +int main() { + + while(1) { + if(s == 0){ + cap.get(); + sprintf(temp,"btemp = %d",cap.temperature()/10); + } + s = s+1; + if(s == 10000){ + s=0; + } + int i = 0; + while(i < 100){ + ant.puts(temp); + i = i +1; + } + wait(5); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 15 12:13:52 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file