Skip to content

A EV3RT Bluetooth library which handles all the communication with the Mobile App

Notifications You must be signed in to change notification settings

Binozo/EV3RT-Bluetooth-Console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EV3RT-Bluetooth-Console

A EV3RT Bluetooth library which handles all the communication with the Mobile App.

Setup

  • Place btconsole.cpp and btconsole.h in your EV3RT project
  • Add btconsole.o to Makefile.inc Example:
    APPL_COBJS +=
    APPL_CXXOBJS += btconsole.o
    
    SRCLANG := c++
    
    ifdef CONFIG_EV3RT_APPLICATION
    
    # Include libraries
    include $(EV3RT_SDK_LIB_DIR)/libcpp-test/Makefile
    include $(EV3RT_SDK_LIB_DIR)/lib2/Makefile
    
    endif
    

Methods

ev3_bt_connected()

  • Returns true if the brick is connected with a device via bluetooth

ev3_bt_console_connected()

  • Returns true if the brick is connected to the EV3RT Mobile App

ev3_bt_console_send_message(const char *message)

  • Sends a message to the Mobile App
  • Example: ev3_bt_console_send_message("Hello World")
  • Caution: Sending a message containing "!" results in a disconnect from the mobile app
  • Caution: You have to send \r at the end of every message
  • Returns true if successful

ev3_bt_console_receive_message(char *buffer)

  • Reads a message from the Mobile App
  • Example:
    char strbuf;
    ev3_bt_console_receive_message(&strbuf);
    const char message = strbuf;
    ev3_bt_console_send_message(&message);
    

About

A EV3RT Bluetooth library which handles all the communication with the Mobile App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published