Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- javiervicente
- Date:
- 2020-12-09
- Revision:
- 1:52b7ac862f35
- Parent:
- 0:2ef3f0a3ce31
File content as of revision 1:52b7ac862f35:
#include "mbed.h" Serial pc(USBTX, USBRX); // tx, rx DigitalOut led(LED1); DigitalOut step(D13); DigitalOut dir(D12); DigitalOut enable(D11); int main() { pc.baud(115200); enable=1; wait(1.0); while(1) { dir=1; for(int n=0; n<4000; n++) { step=1; wait_us(100); step=0; wait_us(900); } wait(2); dir=0; for(int n=0; n<4000; n++) { step=1; wait_us(100); step=0; wait_us(900); } led = !led; wait(2); } }