1

Topic: using remotexy with integrated esp32

I asked earlier about using an arduino wifi rev 2 with remotexy but the administrator said he didn't know whether it would work. I have since done some research and found this board uses an integrated esp 32. On the remotexy website, it says there is support for this module. in the module interface on the editor there is only options for an esp 32 board. Is there a way to use remotexy with an integrated esp32?

2

Re: using remotexy with integrated esp32

RemoteXY can work with any board that is using the Arduino framework, there is no magic, all it does is send/receive data to/from wifi/bluetooth/serial/whatever. What did you try ? You may need to write a custom interface but it's not hard at all (look examples in the remotexy/modules folder).

3

Re: using remotexy with integrated esp32

I am using this example code for an AP connection:
https://www.arduino.cc/en/Reference/WiFiNINABeginAP

And the simple webserver code included in the wifinina library. I had a look at the examples for the remotexy library, how would you go about linking these two codes?

I tried calling some functions from the example code on a remotexy esp32_core sketch but received some error messages. It seems that i need to define a function for the integrated esp32 module. 

/*
   -- New project --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 2.4.3 or later version 
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.5.1 or later version;
     - for iOS 1.4.1 or later version;
    
   This source code is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.    
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP32CORE_WIFI_POINT
#include <WiFi.h>
#include <SPI.h>
#include <WiFiNINA.h>
#include "arduino_secrets.h"



#include <RemoteXY.h>


/* RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID "RemoteXY"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377
*/

char ssid[] = SECRET_SSID;        // your network SSID (name)
char pass[] = SECRET_PASS;    // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;      

int led =  LED_BUILTIN;
int status = WL_IDLE_STATUS;
WiFiServer server(80);

// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,0,0,20,0,10,13,0,
  2,0,0,0,100,63,2,26,31,31,
  79,78,0,79,70,70,0 };

  
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t switch_1; // =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          //
/////////////////////////////////////////////



void setup() 
{
  RemoteXY_Init (); 
    
    
  Serial.print("Creating access point named: ");
  Serial.println(ssid);

  // Create open network. Change this line if you want to create an WEP network:
  status = WiFi.beginAP(ssid, pass);
  if (status != WL_AP_LISTENING) {
    Serial.println("Creating access point failed");
    // don't continue
    while (true);
  }

  // wait 10 seconds for connection:
  delay(10000);

  // start the web server on port 80
  server.begin();

  // you're connected now, so print out the status
  printWiFiStatus();
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


}

Error message below

In file included from F:\Documents\Arduino\sketch_sep06a\sketch_sep06a.ino:31:0:
F:\Documents\Arduino\libraries\RemoteXY/RemoteXY.h:119:4: error: #error RemoteXY mode does not defined or defined error: REMOTEXY_MODE__XXXXXXX
   #error RemoteXY mode does not defined or defined error: REMOTEXY_MODE__XXXXXXX
    ^~~~~
Multiple libraries were found for "WiFi.h"
Used: C:\Users\HP Desktop\Desktop\fence\arduino-nightly\libraries\WiFi
Not used: F:\Documents\Arduino\libraries\WiFiNINA
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.

4

Re: using remotexy with integrated esp32

It seems that you are using an old version of remotexy library

And as I said, you possibly have to write your own communication module, look for example https://github.com/RemoteXY/RemoteXY-Ar … ore_wifi.h

But there is not much differences between the esp wifi library and wifinina library, the only dfference I can see is wifinina library use "wifi.beginAP()" and the esp32 wifi library uses "wifi.softAP()", so maybe a simple workaround is to add #define softAP beginAP before #include <RemoteXY.h>

One thing I hate in the default modules is that they do all the wifi setup internally and leave no choice for the user. This is why I create my own modules where I remove all the wifi setup, for example this one allowing to use wifimanager library: http://forum.remotexy.com/viewtopic.php?pid=2514#p2514