Project for 380

Dependencies:   mbed Servo

Files at this revision

API Documentation at this revision

Comitter:
b28nguye
Date:
Sat Sep 28 17:28:05 2019 +0000
Parent:
0:110dc3bbf9c1
Commit message:
import to Mbed Studio

Changed in this revision

Servo.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 110dc3bbf9c1 -r 679934743c5e Servo.lib
--- a/Servo.lib	Fri Sep 27 15:21:03 2019 +0000
+++ b/Servo.lib	Sat Sep 28 17:28:05 2019 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/simon/code/Servo/#22b2abaa0f44
+https://os.mbed.com/users/b28nguye/code/Servo/#22b2abaa0f44
diff -r 110dc3bbf9c1 -r 679934743c5e main.cpp
--- a/main.cpp	Fri Sep 27 15:21:03 2019 +0000
+++ b/main.cpp	Sat Sep 28 17:28:05 2019 +0000
@@ -1,6 +1,7 @@
 // Continuously sweep the servo through it's full range
 #include "mbed.h"
 #include "Servo.h"
+#include "stdio.h"
 
 Servo servo_1(D3);
 Servo servo_2(D5);
@@ -44,13 +45,17 @@
 }
 
 int main() {
-    printf ("test start");
+    printf ("\n test start\n");
     wait(1.0);
     //test_write(servo_1);
-    test_position(servo_1);
+    //test_position(servo_1);
     int x = 0;
+    char n;
+    int y;
     while (1){
-        printf ("Test %d ", x);
+        printf ("Test %d \n", x);
         x +=1;
+        scanf("%1c", &n);
+        printf("You said, %c \n", n);
     }
 }
\ No newline at end of file