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.
Dependencies: mbed
main.cpp
- Committer:
- YARodriguez
- Date:
- 2017-10-06
- Revision:
- 0:1cd78549370a
- Child:
- 1:d33dca22f3a1
File content as of revision 0:1cd78549370a:
#include "mbed.h"
#include "SoftSerial.h"
PwmOut mypwm(D5);
Serial pc(USBTX,USBRX);
DigitalOut myled(LED1);
SoftSerial bt(D2,D3);
char receive;
float vel;
int main()
{
while(1)
{
if (bt.readable()>0)
{
receive=bt.getc();
vel=receive-48;
vel/=10;
pc.printf("%c %f\n\r", receive, vel);
}
mypwm.write(vel);
}
}