Set the following settings in the editor:
Configuration
- Bluetooth
- ESP32 based board
- Bluetooth on chip
- Arduino IDE
Module interface
- Bluetooth name: MyBluetooth
- Mode: Classic bluetooth
Get the code:
#define REMOTEXY_MODE__ESP32CORE_BLUETOOTH
#include <BluetoothSerial.h>
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_BLUETOOTH_NAME "MyBluetooth"
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,1,0,0,0,13,0,13,13,1,
1,0,13,18,36,36,2,31,88,0 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t button_1; // =1 if button pressed, else =0
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
void setup()
{
RemoteXY_Init ();
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
// TODO you loop code
}