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.
Diff: MagneticEncoder.cpp
- Revision:
- 3:1b3354f31db4
- Parent:
- 2:67cf01beacc1
diff -r 67cf01beacc1 -r 1b3354f31db4 MagneticEncoder.cpp --- a/MagneticEncoder.cpp Fri Nov 11 00:54:37 2016 +0000 +++ b/MagneticEncoder.cpp Fri Nov 11 01:11:46 2016 +0000 @@ -5,13 +5,14 @@ DigitalOut myled(LED1); int main() { - + pc.baud(9600); mypwm.period_ms(10); mypwm.pulsewidth_ms(1); - serial.printf("pwm set to %.2f %%\n", mypwm.read() * 100); + while(1) { + serial.printf("pwm set to %.2f %%\n", mypwm.read() * 100); myled = !myled; wait(1); }