
TUK Workshop
Dependencies: mbed lib_workshop_2019
Revision 6:9e03c9ae243b, committed 2019-10-24
- Comitter:
- gvaquette
- Date:
- Thu Oct 24 04:14:47 2019 +0000
- Parent:
- 5:d99659a45cab
- Child:
- 7:c7ff04228b11
- Commit message:
- Blank in main.cpp and pin_connexion.h
Changed in this revision
includes/pin_connexions.h | 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 |
--- a/includes/pin_connexions.h Thu Oct 24 03:54:20 2019 +0000 +++ b/includes/pin_connexions.h Thu Oct 24 04:14:47 2019 +0000 @@ -22,15 +22,15 @@ /****************************************/ /* TO DO 1 : Declare the Serial connexion */ /****************************************/ -Serial Pc (PA_2, PA_3, 115200); +// Place your Serial declaration here /****************************************/ /** CNY declarations **/ /* To be completed */ +// Declare your CNY70 here -AnalogIn CNY1 (PA_7); -AnalogIn CNY2 (PC_2); -AnalogIn CNY3 (PC_3); + + /** End of CNY declaration **/ /****************************************/ @@ -40,13 +40,13 @@ /** Motor by PWM declarations **/ /* To be completed */ -DigitalOut DIR_1L (PC_9); -DigitalOut DIR_2L (PC_8); -DigitalOut DIR_1R (PC_6); -DigitalOut DIR_2R (PC_5); + + + -PwmOut Pwm_ML (PA_9); -PwmOut Pwm_MR (PA_8); + + + /** End of Motor by PWM declarations **/ /****************************************/
--- a/main.cpp Thu Oct 24 03:54:20 2019 +0000 +++ b/main.cpp Thu Oct 24 04:14:47 2019 +0000 @@ -45,11 +45,11 @@ do { pc.printf("\r CNY_1"); - ft_print_cny_analog_voltage(CNY1, pc); + //ft_print_cny_analog_voltage(CNY1, pc); pc.printf("\t CNY_2"); - ft_print_cny_analog_voltage(CNY2, pc); + //ft_print_cny_analog_voltage(CNY2, pc); pc.printf("\t CNY_3"); - ft_print_cny_analog_voltage(CNY3, pc); + //ft_print_cny_analog_voltage(CNY3, pc); } while (!pc.readable()); pc.printf("\n"); user_choice = ft_get_user_choice(pc); @@ -65,12 +65,12 @@ break; case LEFT_MOTOR : - ft_test_motor(Pwm_ML, DIR_1L, DIR_2L, pc); + ft_print_to_be_imp(pc) //TODO : Replace this line user_choice = ft_get_user_choice(pc); break; case RIGHT_MOTOR: - ft_test_motor(Pwm_MR, DIR_1R, DIR_2R, pc); + ft_print_to_be_imp(pc) //TODO : Replace this line user_choice = ft_get_user_choice(pc); break;