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
Diff: main.cpp
- Revision:
- 1:0e1cdc344b27
- Parent:
- 0:19d128ee3b65
- Child:
- 2:80b1aa8ca93d
--- a/main.cpp Tue May 29 08:00:38 2018 +0000
+++ b/main.cpp Fri Jun 29 05:34:35 2018 +0000
@@ -12,10 +12,10 @@
pc.printf("\r\n---servo test---\n\r");
while(1) {
pc.printf("degree(-90~90) : ");
- scanf("%f",&a);
+ pc.scanf("%f",&a);
if(-90<=a&&a<=90) {
b=calc(a);
- printf("%f PWM:%f\r\n",a,b);
+ pc.printf("%f PWM:%f\r\n",a,b);
servo.pulsewidth(b);
} else {
break;