micro:bit and PiBorg i2c motor driver (PiBorg Reverse) example program for a Web Bluetooth demo that lets you drive around a 4WD buggy http://www.thebubbleworks.com/
Dependencies: BLE_API NanoBit PicoBorgReverse mbed nRF51822
Diff: MyDebug.h
- Revision:
- 0:9ea115d01a95
- Child:
- 1:5e5183fed184
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MyDebug.h Mon Mar 14 09:17:39 2016 +0000 @@ -0,0 +1,25 @@ +#ifndef MY_DEBUG_H +#define MY_DEBUG_H + +#define MY_DBG_ENABLED 1 + + +//------------------------------------------------------ +// Caveman debugging + +#include "mbed.h" + +#ifdef MY_DBG_ENABLED +#define MY_DBG_MSG_MAX 100 +static char dbgMsg [MY_DBG_MSG_MAX]= {0}; +#define MY_DBG_PRINTF(x, ...) serial.printf(x, __VA_ARGS__); +#define MY_DBG_PRINT(x) serial.printf(x); +extern Serial serial; +#else +#define MY_DBG_PRINT(x) +#define MY_DBG_PRINTF(x, ...) +#endif + +#define MY_ERR_PRINT(x) serial.printf((x)); + +#endif