1 (edited by NeTgHoSt 2020-05-21 23:12:06)

Topic: ESP32 Compiling Error using Arduino IDE.. :(

Hello, I am attempting to program my ESP32 using the Arduino IDE to read temperature and humidity data and report back to my Android phone via RemoteXY app. I have installed the RemoteXY library. I have semi-successfully got it working using esp32 in AP mode, although for some reason the wifi signal is VERY low.. phone needs to be directly next to esp32 device. Trying to instead connect via bluetooth, I changed "#define REMOTEXY_MODE_ESP32CORE_WIFI_POINT" to, "#define REMOTEXY_MODE__ESP32CORE_BLE" and ended up getting the compile error: "#error RemoteXY mode does not defined or defined error: REMOTEXY_MODE__XXXXXXX"

Doing some googling lead me to this forum and a link to a modified version of the RemoteXY library that I supposedly needed to use, but after replacing with that library, the compile error remained. This is the forum post: http://forum.remotexy.com/viewtopic.php?id=689 I looked into the .h file and noticed the #define should read "REMOTEXY_MODE__ESP32_BT" or "REMOTEXY_MODE__ESP32_BLE" depending on which type of BT I want to use. I still get the same compile error. I have tried restarting the arduino IDE software to make sure that wasn't the problem. I can't figure out what to try next. Any suggestions?

Here is the code so far:

#include <RemoteXY.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTPIN 15
#define DHTTYPE DHT11

// RemoteXY select connection mode and include library 

// RemoteXY connection settings 

// RemoteXY configuration
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,0,0,32,0,68,0,10,12,0,
  17,5,2,26,11 };
// this structure defines all the variables and events of your control interface 
struct {

    // output variables
  int8_t level_1; // =0..100 level position 
  int8_t level_2; // =0..100 level position 
  float TempHumidityHistory_var1;
  float TempHumidityHistory_var2;
  char text_1[11];  // string UTF8 end zero 
  char text_2[11];  // string UTF8 end zero 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY;
#pragma pack(pop)

//           END RemoteXY include          //

void setup() 
  RemoteXY_Init (); 

void loop() 
  RemoteXY_Handler ();
  float TempF = dht.readTemperature(true);//Read Temp in F.  
  dtostrf (TempF, 11, 1, RemoteXY.text_1);
  RemoteXY.TempHumidityHistory_var1 = float (TempF);
  float Humid = dht.readHumidity();//Read Humidity in %RH.
  dtostrf (Humid, 11, 1, RemoteXY.text_2);
  RemoteXY.TempHumidityHistory_var2 = float (Humid);
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 



Re: ESP32 Compiling Error using Arduino IDE.. :(


You have to #include the library after the #define.

3 (edited by NeTgHoSt 2020-05-22 20:04:29)

Re: ESP32 Compiling Error using Arduino IDE.. :(

Thank you, I didn't know that would make a difference! Would someone happen to know why the RemoteXY app kicks me out of my remote session after a little while? Only works for maybe 30 seconds at a time.. even after purchasing the paid app. then it just quits out to the remote list. Did this using WiFi also. Might have to do with my low signal.. is there a way to change signal strength or channeling within this library?

EDIT: Definitely due to bad signal. Can't believe this thing only connects to my wifi within maybe 8 feet away. Guess I'm searching for a better ESP32 module! Thanks for the help!