
A test program for the RS animatronic lab board motor drivers.
Dependencies: HBridge mbed FatFileSystem MSCFileSystem WavPlayer
Revision 0:0c8935f6db19, committed 2012-09-20
- Comitter:
- p07gbar
- Date:
- Thu Sep 20 11:36:32 2012 +0000
- Child:
- 1:939f893149f2
- Commit message:
- Working
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HBridge.lib Thu Sep 20 11:36:32 2012 +0000 @@ -0,0 +1,1 @@ +HBridge#16208393c7ae
--- /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)); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Sep 20 11:36:32 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc \ No newline at end of file