// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP32CORE_BLE
#include <BLEDevice.h>
// RemoteXY connection settings
#define REMOTEXY_BLUETOOTH_NAME "tami"
#include <RemoteXY.h>
// RemoteXY GUI configuration
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] = // 113 bytes
{ 255,3,0,0,0,106,0,19,0,0,0,84,97,109,105,95,49,0,168,1,
106,200,1,1,6,0,2,29,36,44,22,1,23,20,31,31,79,78,0,79,
70,70,0,2,29,90,44,22,1,23,20,31,31,79,78,0,79,70,70,0,
2,28,142,44,22,1,23,20,31,31,79,78,0,79,70,70,0,129,38,19,
26,12,64,191,76,117,122,49,0,129,37,76,26,12,64,191,76,117,122,50,
0,129,37,122,26,12,64,191,76,117,122,51,0 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t switch_01; // =1 if switch ON and =0 if OFF
uint8_t switch_02; // =1 if switch ON and =0 if OFF
uint8_t switch_03; // =1 if switch ON and =0 if OFF
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_01 18
#define PIN_SWITCH_02 17
#define PIN_SWITCH_03 16
void setup()
{
RemoteXY_Init ();
pinMode (PIN_SWITCH_01, OUTPUT);
pinMode (PIN_SWITCH_02, OUTPUT);
pinMode (PIN_SWITCH_03, OUTPUT);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_SWITCH_01, (RemoteXY.switch_01==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_02, (RemoteXY.switch_02==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_03, (RemoteXY.switch_03==0)?LOW:HIGH);
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay(), use instead RemoteXY_delay()
}