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

MyDebug.h

Committer:
waynek
Date:
2016-03-14
Revision:
0:9ea115d01a95
Child:
1:5e5183fed184

File content as of revision 0:9ea115d01a95:

#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