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.
main.cpp
00001 #include "mbed.h" 00002 #include "AM2320.h" 00003 00004 Serial ant(D1, D0); //tx, rx 00005 AM2320 cap(D4, D5); 00006 //Serial pc(D5, D4); 00007 char temp[4]; 00008 int s = 0; 00009 00010 int main() { 00011 00012 while(1) { 00013 if(s == 0){ 00014 cap.get(); 00015 sprintf(temp,"btemp = %d",cap.temperature()/10); 00016 } 00017 s = s+1; 00018 if(s == 10000){ 00019 s=0; 00020 } 00021 int i = 0; 00022 while(i < 100){ 00023 ant.puts(temp); 00024 i = i +1; 00025 } 00026 wait(5); 00027 } 00028 }
Generated on Sun Jul 24 2022 10:48:21 by
1.7.2