52 Bluetooth(PinName TX_pin, PinName RX_pin,
int baud_rate);
BLE HM-10 Interface Class.
bool continous_update
if this is true, sends data on each loop without bt commands.
RawSerial bt_serial
creates the RawSerial object to connect with the bluetooth module
bool data_recieved_complete(void)
Returns true if incoming data is fully recieved.
void set_send_once(bool status)
Set the send once property to the bool value passed.
char * get_rx_buffer(void)
returns the raw data recieved as a character array
static const int buffer_size
Number of bits per packet (20)
char rx_buffer[buffer_size+1]
buffer to store recieved data
Bluetooth(PinName TX_pin, PinName RX_pin, int baud_rate)
Construct a new Bluetooth object.
void data_recieved_ISR(void)
ISR that runs for every character recieved.
void send_buffer(char *char_arr)
Sends character array to the bluetooth.
void reset_rx_buffer(void)
Resets the recieved data buffer for new incoming data.
bool send_once
true when get cmd is used
char tx_buffer[buffer_size+1]
buffer to store transmit data
volatile int rx_index
keeps track of the next memory location to store the next char recieved
bool is_send_once(void)
returns true if send once is enabled
void send_fstring(const char *format,...)
Sends formatted string to the bluetooth.
volatile bool data_complete
true if the incoming data if fully recieved
void set_continous(bool status)
Set the continous property to the bool value passed.
bool is_continous(void)
returns true if continous update is enabled
bool is_ready(void)
returns true if bluetooth module is ready