motor bipolar
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:307508ae08e6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Nov 19 05:07:07 2019 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" + +BusOut M1(D0,D1,D2,D3); +char pos[4]={0x5,0x06,0x0A,0x09}; +char i; + +int main() +{ + while (true) { + M1=pos[0]; + wait(0.5); + + M1=pos[1]; + wait(0.5); + + M1=pos[2]; + wait(0.5); + + M1=pos[3]; + wait(0.5); + } +} \ No newline at end of file