Basic output of force sensor data to serial, in form "value1/n"
Dependencies: mbed BLE_API nRF51822
Diff: main.cpp
- Revision:
- 2:697726f1d35c
- Parent:
- 1:d80d9ec38f57
- Child:
- 3:d37edebcc9e6
- Child:
- 4:c28c34fcb120
--- a/main.cpp Tue Nov 11 01:09:06 2014 +0000 +++ b/main.cpp Tue Nov 11 01:43:24 2014 +0000 @@ -5,6 +5,7 @@ AnalogIn strut1Force(P0_1); AnalogIn strut2Force(P0_2); AnalogIn strut3Force(P0_3); +AnalogIn strut3Force(P0_4); DigitalOut light(LED1); @@ -14,7 +15,7 @@ while (true) { - pc.printf("strut 1 %1.2f, strut 2 %1.2f, strut 3 Voltage%1.2f\n", strut1Force.read(), strut2Force.read(), strut3Force.read()); //print force data to processing + pc.printf("%1.2f,%1.2f,%1.2f,%1.2f\n", strut1Force.read(), strut2Force.read(), strut3Force.read(), 0.01); //print force data to processing wait(0.005f); // wait 5ms (200Hz update rate) } }