Comms Library for communicating via bluetooth
Comms Class Reference
Class library to create a serial connection from the MCU to the bluetooth device. More...
#include <Comms.h>
Public Member Functions | |
Comms (PinName TX, PinName RX) | |
Create a serial connection from the MCU to the bluetooth device. | |
Data Fields | |
float | data |
changing the boolen variable to false. | |
char | cmd [50] |
Character string for storing the direction. | |
bool | newmsg |
boolean variable to state if there is a new message or not. |
Detailed Description
Class library to create a serial connection from the MCU to the bluetooth device.
Example:
#include "mbed.h" *#include "Comms.h" *Comms BT(PC_6, PC_7); *int main() *{ while(1) { if(BT.newmsg == true) { BT.printf("%s\n",BT.cmd); BT. printf("%.2f\n", BT.data); BT.clrmsg(); } } *}
Definition at line 55 of file Comms.h.
Constructor & Destructor Documentation
Comms | ( | PinName | TX, |
PinName | RX | ||
) |
Field Documentation
char cmd[50] |
float data |
Generated on Sun Aug 7 2022 14:32:00 by 1.7.2