The Dream Team
/
first_test
Pop lock n drop it
linepos.cpp
- Committer:
- vsal
- Date:
- 2014-05-22
- Revision:
- 7:d0c19729e7fd
File content as of revision 7:d0c19729e7fd:
#include "mbed.h" #include "m3pi_ng.h" #include "DigitalIn.h" m3pi hue; float myLine(void) { int sensors[5]; hue.calibrated_sensor(sensors); float leftSen, rightSen, midSen; leftSen = sensors[1] / 1000; rightSen = sensors[3] / 1000; midSen = sensors[2] / 1000; return rightSen - leftSen; } int linepos() { while(1) { hue.printf("%f", myLine()); } }