![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
dd
Dependencies: xtoff2 RF24Network mbed
Fork of xtoff3 by
Diff: main.cpp
- Revision:
- 8:c43411433ce1
- Parent:
- 7:8515f205483b
- Child:
- 9:e14f65b8ffc2
--- 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