The Dream Team
/
first_test
Pop lock n drop it
Diff: main.cpp
- Revision:
- 0:80d9725a7342
- Child:
- 1:ac7fc0b5f878
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 20 13:00:55 2014 +0000 @@ -0,0 +1,110 @@ +#include "mbed.h" +#include "m3pi_ng.h" + +DigitalOut myled(LED1); +m3pi huey; + +int main() { + //prints battery voltage on led screen + float bat = huey.battery(); + huey.printf("%f",bat); + + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.5); + + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.5); + + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.5); + + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.5); + + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.5); + + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.1); + huey.forward(0.1); + wait(0.1); + huey.backward(0.1); + wait(0.5); + + + + huey.stop(); + + + + + while(1) + { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}