Main robot of the 2019 MJCup
Dependencies: LED_WS2812 mbed X_NUCLEO_IHM02A1
Diff: Robot.h
- Revision:
- 22:82611fe41c5c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Robot.h Sun Sep 22 06:21:26 2019 +0000 @@ -0,0 +1,15 @@ +//#include "AsyncServo.h" +#include "LED_WS2812.h" +//#include "AsyncBuzzer.h" + +// --- USB Debug Port ----------- + +// #define DEBUG(...) { pc_uart.printf(__VA_ARGS__); bt_uart.printf(__VA_ARGS__);} +#define DEBUG(...) { __disable_irq();bt_uart.printf(__VA_ARGS__); pc_uart.printf(__VA_ARGS__);__enable_irq();} +// #define DEBUG(...) { bt_uart.printf(__VA_ARGS__); } + +#define CATCH_BUTTON(button, func) button.fall(&func) + +#define CASE(letter, text, commands) case letter: if(flaghelp) DEBUG("\t%c : %s\n\r", letter,text);if(!flaghelp) {commands;break;}; + +