A test program for the RS animatronic lab board motor drivers.
Dependencies: HBridge mbed FatFileSystem MSCFileSystem WavPlayer
Diff: main.cpp
- Revision:
- 0:0c8935f6db19
- Child:
- 2:f8199cc69b20
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Sep 20 11:36:32 2012 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +#include "HBridge.h" + +HBridge hbridge(p18,p15,p22); +DigitalIn button(p16); +AnalogIn pot1(p19); + +int main() { + button.mode(PullDown); + while(1) { + hbridge.speed((pot1 - 0.5) * 2); + hbridge.power(bool(button)); + } +}