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: xtoff2 RF24Network mbed
Fork of xtoff3 by
Diff: main.cpp
- Revision:
- 8:c43411433ce1
- Parent:
- 7:8515f205483b
- Child:
- 9:e14f65b8ffc2
diff -r 8515f205483b -r c43411433ce1 main.cpp
--- a/main.cpp Wed Feb 21 12:05:17 2018 +0000
+++ b/main.cpp Thu Feb 22 14:08:11 2018 +0000
@@ -7,21 +7,10 @@
#include "mbed.h"
#include "Ontvanger.h"
-DigitalOut myled1(LED1);
-DigitalOut myled2(LED2);
-DigitalOut myled3(LED3);
-DigitalOut myled4(LED4);
-
Serial pc(USBTX, USBRX);
-
Ontvanger receive;
-
Timer t;
-enum State2 {init_state,
- send_state,
- receive_state
- };
State2 current_state = init_state;
@@ -72,7 +61,7 @@
if (receive.available()) {
payload_t payload;
payload = receive.read();
- pc.printf("massa = %d\r\n",payload.milligram);
+ pc.printf("%f\r\n", payload.milligram);
if (payload.reedsensor) {
acitvateLed();
}
@@ -90,7 +79,6 @@
wait(0.5);
}
break;
-
}
}
}
\ No newline at end of file
