A sample of library "Motor_LockedAntiphase"
Dependencies: Motor_LockedAntiphase mbed
Revision 0:cc2d257ecd53, committed 2014-04-23
- Comitter:
- spiralray
- Date:
- Wed Apr 23 16:38:24 2014 +0000
- Commit message:
- A sample of library "Motor_LockedAntiphase"
Changed in this revision
diff -r 000000000000 -r cc2d257ecd53 Motor_LockedAntiphase.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor_LockedAntiphase.lib Wed Apr 23 16:38:24 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/spiralray/code/Motor_LockedAntiphase/#62943ca4f7a0
diff -r 000000000000 -r cc2d257ecd53 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Apr 23 16:38:24 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "motor_lockedantiphase.h" + +PwmOut motora(PA_0); +PwmOut motorb(PA_1); +Motor_LockedAntiphase motor(motora,motorb); + +DigitalOut myled(LED1); + +int main() { + + motor.period_us(50); //20kHz + + while(1) { + myled =1; + motor =1.0; + wait(1); + myled = 0; + motor = 0; + wait(1); + } +}
diff -r 000000000000 -r cc2d257ecd53 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Apr 23 16:38:24 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e \ No newline at end of file