complete motor
Dependencies: BufferedSerial motor_sn7544
main.cpp
- Committer:
- kangmingyo
- Date:
- 2019-05-09
- Revision:
- 0:dde6e4d8c301
- Child:
- 1:1d18a2e8ce45
File content as of revision 0:dde6e4d8c301:
#include "mbed.h" Serial pc(USBTX,USBRX,115200); DigitalOut led(LED2); void rx_cn(void){ while(true){ char ch; ch =pc.getc(); pc.putc(ch); if(ch ==0x0D){ pc.putc(0x0A); } } } int main(){ pc.attach(&rx_cn); while(1){ wait(1); led = !led; } }