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 09:17:39 2016 +0000
Revision:
0:9ea115d01a95
Child:
1:5e5183fed184
initial public version

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 #define MY_DBG_ENABLED 1
waynek 0:9ea115d01a95 5
waynek 0:9ea115d01a95 6
waynek 0:9ea115d01a95 7 //------------------------------------------------------
waynek 0:9ea115d01a95 8 // Caveman debugging
waynek 0:9ea115d01a95 9
waynek 0:9ea115d01a95 10 #include "mbed.h"
waynek 0:9ea115d01a95 11
waynek 0:9ea115d01a95 12 #ifdef MY_DBG_ENABLED
waynek 0:9ea115d01a95 13 #define MY_DBG_MSG_MAX 100
waynek 0:9ea115d01a95 14 static char dbgMsg [MY_DBG_MSG_MAX]= {0};
waynek 0:9ea115d01a95 15 #define MY_DBG_PRINTF(x, ...) serial.printf(x, __VA_ARGS__);
waynek 0:9ea115d01a95 16 #define MY_DBG_PRINT(x) serial.printf(x);
waynek 0:9ea115d01a95 17 extern Serial serial;
waynek 0:9ea115d01a95 18 #else
waynek 0:9ea115d01a95 19 #define MY_DBG_PRINT(x)
waynek 0:9ea115d01a95 20 #define MY_DBG_PRINTF(x, ...)
waynek 0:9ea115d01a95 21 #endif
waynek 0:9ea115d01a95 22
waynek 0:9ea115d01a95 23 #define MY_ERR_PRINT(x) serial.printf((x));
waynek 0:9ea115d01a95 24
waynek 0:9ea115d01a95 25 #endif