Teacher version
Dependencies: mbed lib_workshop_2019
main.cpp
- Committer:
- gvaquette
- Date:
- 2019-10-23
- Revision:
- 1:7a8764e627b5
- Parent:
- 0:0a75a79d6b77
- Child:
- 2:8153195b1672
File content as of revision 1:7a8764e627b5:
#include "mbed.h" #include "console_output.h" #include "test_us.h" #include "test_compass.h" #include "pin_connexions.h" Serial pc (PA_2, PA_3, 115200); int main() { e_test user_choice ; ft_print_test_menu(pc); user_choice = ft_get_user_choice(pc); while(1) { switch (user_choice) { case ULTRASONIC : do { ft_print_all_values_US(ultra_sonic, pc); } while (!pc.readable()); user_choice = ft_get_user_choice(pc); pc.printf("\n"); break; case COMPASS : do { ft_print_compass_values(compass, pc); } while (!pc.readable()); pc.printf("\n"); user_choice = ft_get_user_choice(pc); break; default : ft_print_test_menu(pc); user_choice = ft_get_user_choice(pc); break; } } }