![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Tuk tutoriail
Dependencies: mbed lib_workshop_2019
src/console_output.cpp
- Committer:
- dgwambaa
- Date:
- 2019-10-28
- Revision:
- 10:2c17068cb551
- Parent:
- 4:bf5caf4c0c88
File content as of revision 10:2c17068cb551:
#include "mbed.h" #include "console_output.h" void ft_print_test_menu(Serial &Pc) { Pc.printf ("\n\n\n\n\rTesting program \n\n\r Which test do you want to perform ?\n\n"); Pc.printf ("\r%d- Ultrasonic sensors (all of them)\n", ULTRASONIC); Pc.printf ("\r%d- Compass and I2C\n", COMPASS); Pc.printf ("\r%d- CNY70 (all of them) \n",CNY70); Pc.printf ("\r%d- VBAT \t! Wrong voltage !\n",VBAT); Pc.printf ("\r%d- Left motor\n", LEFT_MOTOR); Pc.printf ("\r%d- MRight motor \n", RIGHT_MOTOR); Pc.printf ("\r%d- PIXY (CMUCAM5)\n", PIXY); } e_test ft_get_user_choice(Serial &pc) { e_test user_choice = (e_test) (pc.getc() -'0'); return user_choice; } int ft_get_user_int(Serial &pc) { int user_int = (e_test) (pc.getc() -'0'); if (user_int > 9 || user_int < 0) return -1; else return user_int; } void ft_print_to_be_imp(Serial &pc) { printf("\rTo be implemented"); }