Thread example of multiple things happening at once. Requires mbed OS 5 and up-to-date mbed firmware.

Dependencies:   Motor Servo

Fork of Fa2018-es200-1121-3321-thread-example-peanut by Fa2018-es200-3321-proj2-GoodTeam#2

Revision:
3:68bba10e81aa
Parent:
2:2710cfd7bc6a
Child:
4:6ccbc7542ddc
--- a/main.cpp	Sun Oct 14 21:58:10 2018 +0000
+++ b/main.cpp	Sun Oct 14 22:00:35 2018 +0000
@@ -49,12 +49,11 @@
 
 
 
-
+/**
+ * Callback for executing a simple motor action. When sw1 is high,
+ * the motor turns forward, otherwise the motor turns off.
+ */
 void m_callback(void){
-    /**
-    Callback for executing a simple motor action. When sw1 is high,
-    the motor turns forward, otherwise the motor turns off. 
-    */
     printf("m_thread running\n");
     while(1) {
         if (sw1.read()){
@@ -71,12 +70,11 @@
     
     
     
-    
+/**
+ * Simple callback for servo motion. When sw2 is high, the servo steps right,
+ * otherwise it steps left. If it hits the ends it stays there.
+ */
 void s1_callback(void){
-    /** 
-    Simple callback for servo motion. When sw2 is high, the servo steps right,
-    otherwise it steps left. If it hits the ends it stays there.  
-    */
     printf("s1_thread running\n");    
     while(1){
         if (sw2.read()){