Tutorial for first mbed project

Dependencies:   mbed lib_workshop_2019

Files at this revision

API Documentation at this revision

Comitter:
gvaquette
Date:
Thu Oct 24 05:49:30 2019 +0000
Parent:
6:9e03c9ae243b
Child:
8:c2d06715025f
Commit message:
student run_motor

Changed in this revision

src/test_cny/ft_print_value_cny.cpp Show annotated file Show diff for this revision Revisions of this file
src/test_motor/ft_run_motor.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/src/test_cny/ft_print_value_cny.cpp	Thu Oct 24 04:14:47 2019 +0000
+++ b/src/test_cny/ft_print_value_cny.cpp	Thu Oct 24 05:49:30 2019 +0000
@@ -13,17 +13,14 @@
 
 void ft_print_cny_analog_voltage(AnalogIn &analog_input, Serial &pc)
 {
+    const double max_voltage = 3.3;
     /* TO BE IMPLEMENTED */
-    const double max_voltage = 3.3;
-    double value = analog_input.read();
-    double voltage = value * max_voltage;
-    pc.printf("voltage value : %lf V ", voltage);
+
     return;
 }
 
 
 void ft_print_cny_library_voltage(CNY70 &cny_sensor, Serial &pc)
 {
-    /* TO BE COMPUTED */
     return;    
 }
\ No newline at end of file
--- a/src/test_motor/ft_run_motor.cpp	Thu Oct 24 04:14:47 2019 +0000
+++ b/src/test_motor/ft_run_motor.cpp	Thu Oct 24 05:49:30 2019 +0000
@@ -16,15 +16,15 @@
     
     if (direction == FORWARD)
     {
-        dirA = 1;
-        dirB = 0;   
+       
+       
     }
     else // direction == BACKWARD
     {
-        dirA = 0;
-        dirB = 1;  
+      
+      
     }
     
     /* TO DO : apply duty cycle to pwm_mot */
-    pwm_mot = duty_cycle;
+
 }