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

Committer:
waynek
Date:
Mon Mar 14 10:37:25 2016 +0000
Revision:
1:5e5183fed184
Parent:
0:9ea115d01a95
Initial Public commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
waynek 0:9ea115d01a95 1 #ifndef MY_DEBUG_H
waynek 0:9ea115d01a95 2 #define MY_DEBUG_H
waynek 0:9ea115d01a95 3
waynek 0:9ea115d01a95 4 //------------------------------------------------------
waynek 0:9ea115d01a95 5 // Caveman debugging
waynek 0:9ea115d01a95 6
waynek 0:9ea115d01a95 7 #include "mbed.h"
waynek 0:9ea115d01a95 8
waynek 0:9ea115d01a95 9 #ifdef MY_DBG_ENABLED
waynek 0:9ea115d01a95 10 #define MY_DBG_MSG_MAX 100
waynek 0:9ea115d01a95 11 static char dbgMsg [MY_DBG_MSG_MAX]= {0};
waynek 0:9ea115d01a95 12 #define MY_DBG_PRINTF(x, ...) serial.printf(x, __VA_ARGS__);
waynek 0:9ea115d01a95 13 #define MY_DBG_PRINT(x) serial.printf(x);
waynek 0:9ea115d01a95 14 extern Serial serial;
waynek 0:9ea115d01a95 15 #else
waynek 0:9ea115d01a95 16 #define MY_DBG_PRINT(x)
waynek 0:9ea115d01a95 17 #define MY_DBG_PRINTF(x, ...)
waynek 0:9ea115d01a95 18 #endif
waynek 0:9ea115d01a95 19
waynek 0:9ea115d01a95 20 #define MY_ERR_PRINT(x) serial.printf((x));
waynek 0:9ea115d01a95 21
waynek 0:9ea115d01a95 22 #endif