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
00001 #include "mbed.h" 00002 #include "SoftSerial.h" 00003 00004 PwmOut mypwm(D6); 00005 Serial pc(USBTX,USBRX); 00006 DigitalOut myled(LED1); 00007 SoftSerial bt(D2,D3); 00008 00009 char receive; 00010 float vel; 00011 int main() { 00012 while(1) { 00013 if(bt.readable()>0) 00014 { 00015 receive=bt.getc(); 00016 vel=receive-48; 00017 vel/=10; 00018 pc.printf("%c %f\n\r",receive,vel); 00019 mypwm.write(vel); 00020 } 00021 00022 } 00023 }
Generated on Mon Jul 18 2022 14:44:10 by
1.7.2