A test program for the RS animatronic lab board motor drivers.
Dependencies: HBridge mbed FatFileSystem MSCFileSystem WavPlayer
main.cpp
- Committer:
- p07gbar
- Date:
- 2012-09-20
- Revision:
- 0:0c8935f6db19
- Child:
- 2:f8199cc69b20
File content as of revision 0:0c8935f6db19:
#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)); } }