![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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
--- /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
--- /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); + } +}
--- /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