2014 Eurobot fork
Dependencies: mbed-rtos mbed QEI
Diff: main.cpp
- Revision:
- 8:69bdf20cb525
- Parent:
- 5:56a5fdd373c9
- Child:
- 10:1f0cf0182067
diff -r 56a5fdd373c9 -r 69bdf20cb525 main.cpp --- a/main.cpp Thu Apr 04 14:44:14 2013 +0000 +++ b/main.cpp Thu Apr 04 19:37:05 2013 +0000 @@ -1,4 +1,4 @@ -#pragma Otime // Compiler Optimisations +//#pragma Otime // Compiler Optimisations // Eurobot13 main.cpp @@ -11,6 +11,7 @@ #include "Sensors/Colour/Colour.h" #include "Sensors/Colour/Led.h" #include "Sensors/Colour/Phototransistor.h" +#include "Sensors/CakeSensor/CakeSensor.h" @@ -25,6 +26,7 @@ void phototransistortest(); void ledphototransistortest(); void colourtest(); +void cakesensortest(); int main() { @@ -33,7 +35,7 @@ *****************/ //motortest(); //encodertest(); - motorencodetest(); + //motorencodetest(); //motorencodetestline(); //motorsandservostest(); //armtest(); @@ -42,6 +44,18 @@ //phototransistortest(); //ledphototransistortest(); //colourtest(); // Red SnR too low + cakesensortest(); +} + +void cakesensortest(){ + wait(1); + pc.printf("cakesensortest"); + + CakeSensor cs(p20); + while(true){ + wait(0.1); + pc.printf("distance: %f\t %f\r\n", cs.Distance(),cs.Distanceincm()); + } } void colourtest(){