Supachai Vorapojpisut
/
le484_2016
Course project for LE484 at Thammasat University, class of 2016
Diff: sensorTask.cpp
- Revision:
- 12:845639da2f03
- Parent:
- 9:5b4959a735a1
diff -r 8b9668e37646 -r 845639da2f03 sensorTask.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sensorTask.cpp Mon May 08 05:11:22 2017 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "platform.h" + +AnalogIn analog_value(A0); + +void sensorIn() +{ + float meas; + + while(1) { + meas = analog_value.read(); + meas = meas * 3300; + printf("measure = %.0f mV\n", meas); + + } +}