motor bipolar fijo en 25p
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:65c0ac9e35d2
diff -r 000000000000 -r 65c0ac9e35d2 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Nov 19 05:08:55 2019 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +BusOut M1(D2,D3,D4,D5); +char pos[4]={0x05,0x06,0x0A,0x09}; +int i; + +int main() +{ + int x; + + for(x=0;x<=170;x++){ + + M1=pos[i]; + wait(0.01); + i--; + if(i==0) + i=4; + + + } +} \ No newline at end of file