test tutorial
Dependencies: mbed lib_workshop_2019
Diff: main.cpp
- Revision:
- 9:f1dc5709a98d
- Parent:
- 8:c2d06715025f
diff -r c2d06715025f -r f1dc5709a98d main.cpp --- a/main.cpp Thu Oct 24 06:06:55 2019 +0000 +++ b/main.cpp Thu Oct 24 13:23:03 2019 +0000 @@ -8,15 +8,22 @@ #include "pin_connexions.h" + int main() { e_test user_choice ; ft_print_test_menu(pc); user_choice = ft_get_user_choice(pc); + blue_button_interupt.fall(&change_direction); + + /* Main loop */ while(1) { + + wait_ms(250); + /* Which component to test ? */ switch (user_choice) { @@ -42,11 +49,11 @@ do { pc.printf("\r CNY_1"); - //ft_print_cny_analog_voltage(CNY1, pc); + ft_print_cny_analog_voltage(cny_1, pc); pc.printf("\t CNY_2"); - //ft_print_cny_analog_voltage(CNY2, pc); + ft_print_cny_analog_voltage(cny_2, pc); pc.printf("\t CNY_3"); - //ft_print_cny_analog_voltage(CNY3, pc); + ft_print_cny_analog_voltage(cny_3, pc); } while (!pc.readable()); pc.printf("\n"); user_choice = ft_get_user_choice(pc); @@ -62,12 +69,12 @@ break; case LEFT_MOTOR : - ft_print_to_be_imp(pc); //TODO : Replace this line + ft_test_motor(Pwm_ML, DIR_1L, DIR_2L, pc); user_choice = ft_get_user_choice(pc); break; case RIGHT_MOTOR: - ft_print_to_be_imp(pc); //TODO : Replace this line + ft_test_motor(Pwm_MR, DIR_1R, DIR_2R, pc); user_choice = ft_get_user_choice(pc); break;