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.
Diff: main.cpp
- Revision:
- 0:c65715546ba8
diff -r 000000000000 -r c65715546ba8 main.cpp
--- /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);
+ }
+}