Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: USBDevice mbed mbed-rtos
bluetoothComm.h
- Committer:
- baraki
- Date:
- 2015-03-26
- Revision:
- 0:7c2805142589
- Child:
- 2:1a0d675eaa6f
File content as of revision 0:7c2805142589:
#ifndef INCL_ROBOTLIBRARY_H #define INCL_ROBOTLIBRARY_H #include "mbed.h" #include "USBSerial.h" #define bluetoothAvailable() (bt.readable()) #define sendBluetoothChar(toSend) (bt.putc((char)toSend)) #define getBluetoothChar() ((char) bt.getc()) #include "string_functions.h" #define robotPrint(toPrint) console1.printf(toPrint) #define robotPrintln(toPrint) console1.printf(toPrint) #define PRINT_DEBUG 1 #if PRINT_DEBUG == 1 #define robotPrintDebug(toPrint) robotPrint(toPrint) #define robotPrintlnDebug(toPrint) robotPrintln(toPrint) #else #define robotPrintDebug(toPrint) #define robotPrintlnDebug(toPrint) #endif extern Serial bt; // tx, rx extern USBSerial console1; extern char bluetoothData[50]; bool getBluetoothData(); bool isBluetoothConnected(); void setBluetoothConnected(bool btCon); void processBluetoothData(); char* returnBluetoothData(); bool isBluetoothDataValid(); void robotLoop(); void robotSetup(int baud_rate); void sendBluetoothData(const char* data); #endif