1 (edited by mci_ryan 2021-08-05 02:54:58)

Topic: Maximum of 2 'elements'

Hello,

I can't use remoteXY if I have more than 2 'apps' added to my project.

I also can't re-connect after disconnecting without resetting the board.

With 2 'apps' or less, everything functions perfectly fine.
As soon as 3 or more are used, I can see the BLE connection, tap it, then get a communication error after 4 attempts. Then after that, I got a connection error (rather than the failed attempts at getting the UI information), until I reset the board.

Board is esp32. I have tried on 3 seperate boards. Everything functions fine with 1 or 2 apps being used so my setup shouldn't have any issues.

Phone is Samsung Galaxy Note 10.

I have tried hard serial, soft serial and a host of other configurations and end up with the same problem.

I have tried both the free and paid versions of the remoteXY app.

Is there something that I'm not doing correctly?

2

Re: Maximum of 2 'elements'

mci_ryan wrote:

I have more than 2 'apps' added to my project.

Do you mean you added more than two devices to the application and after that you can not connect?

3 (edited by Gunner 2021-08-02 19:06:20)

Re: Maximum of 2 'elements'

mci_ryan wrote:

With 2 'apps' or less, everything functions perfectly fine.
As soon as 3 or more are used, I can see the BLE connection, tap it, then get a communication error

Sounds to me like the OP is using multiple phones/tablets to connect to a single ESP32 via BLE.  And anything over two refuses to connect.  Perhaps the OP is not running 3.1.6 library?

According to espressif docs... https://docs.espressif.com/projects/esp … d-to-esp32

How many Bluetooth® clients can be connected to ESP32?
The Bluetooth LE server supports up to nine client connections, please check the configuration of parameter ble_max_conn for applications. For stable connection, three clients should be good.

"And voila, which is French for.......'and then I found out.'" - Ready Player One

4

Re: Maximum of 2 'elements'

remotexy wrote:
mci_ryan wrote:

I have more than 2 'apps' added to my project.

Do you mean you added more than two devices to the application and after that you can not connect?

No. I'm talking about using more than 2 items on the UI. As in using 2 buttons works fine. 3 buttons does not work.

I use the term 'apps' because that is the term that remoteXY uses when talking about the items used on the UI.

5 (edited by Gunner 2021-08-03 02:26:18)

Re: Maximum of 2 'elements'

Wow... we never would have understood your issue if you kept using "apps" as in short for "Applications" instead of Elements, and they are clearly labeled as such, right above them all in the editor... and in the documentation wink  Even Widgets would have translated as that is another common term for them.

Are you using the Free App or Pro version?

How about supplying us the library version you are using, and any other relevent version info.

I suspect it may be something in your code... How about supplying us with a sketch that doesn't work (for you) that can be tested by others here?

By the way... I have project that has 67 "elements" (LED's) and it runs just fine on ESP32 via BLE.

Give it a try.

/*
   -- LED Matrix --

   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.7.12 or later version;
     - for iOS 1.4.7 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_BLE
#include <BLEDevice.h>

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_BLUETOOTH_NAME "RemoteXY"


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,0,0,201,0,149,1,11,8,0,
  65,23,5,12,9,9,65,23,15,12,
  9,9,65,23,25,12,9,9,65,23,
  35,12,9,9,65,23,45,12,9,9,
  65,23,55,12,9,9,65,23,65,12,
  9,9,65,23,75,12,9,9,65,23,
  85,12,9,9,65,23,10,4,9,9,
  65,23,20,4,9,9,65,23,30,4,
  9,9,65,23,40,4,9,9,65,23,
  50,4,9,9,65,23,60,4,9,9,
  65,23,70,4,9,9,65,23,80,4,
  9,9,65,23,90,4,9,9,65,23,
  0,4,9,9,65,23,5,28,9,9,
  65,23,15,28,9,9,65,23,25,28,
  9,9,65,23,35,28,9,9,65,23,
  45,28,9,9,65,23,55,28,9,9,
  65,23,65,28,9,9,65,23,75,28,
  9,9,65,23,85,28,9,9,65,23,
  0,20,9,9,65,23,10,20,9,9,
  65,23,20,20,9,9,65,23,30,20,
  9,9,65,23,40,20,9,9,65,23,
  50,20,9,9,65,23,60,20,9,9,
  65,23,70,20,9,9,65,23,80,20,
  9,9,65,23,90,20,9,9,65,23,
  5,44,9,9,65,23,15,44,9,9,
  65,23,25,44,9,9,65,23,35,44,
  9,9,65,23,45,44,9,9,65,23,
  55,44,9,9,65,23,65,44,9,9,
  65,23,75,44,9,9,65,23,85,44,
  9,9,65,23,0,52,9,9,65,23,
  10,52,9,9,65,23,20,52,9,9,
  65,23,30,52,9,9,65,23,40,52,
  9,9,65,23,50,52,9,9,65,23,
  60,52,9,9,65,23,70,52,9,9,
  65,23,80,52,9,9,65,23,90,52,
  9,9,65,23,0,36,9,9,65,23,
  10,36,9,9,65,23,20,36,9,9,
  65,23,30,36,9,9,65,23,40,36,
  9,9,65,23,50,36,9,9,65,23,
  60,36,9,9,65,23,70,36,9,9,
  65,23,80,36,9,9,65,23,90,36,
  9,9 };
  
// this structure defines all the variables and events of your control interface
struct {
  // output variables
  uint8_t RGBLED[201]; // Total number of LED element references.  Eg. 67 LED elements each with Red, Green, Blue variables
} RemoteXY;

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////



void setup() {
  randomSeed(analogRead(0));
  RemoteXY_Init ();
}



void loop() {
  RemoteXY_Handler ();
  RemoteXY.RGBLED[random(202)] = random(256);  // Pick an LED variable from 0-201 and apply value 0-255
}
"And voila, which is French for.......'and then I found out.'" - Ready Player One

6

Re: Maximum of 2 'elements'

Gunner wrote:

Wow... we never would have understood your issue if you kept using "apps" as in short for "Applications" instead of Elements, and they are clearly labeled as such, right above them all in the editor... and in the documentation wink  Even Widgets would have translated as that is another common term for them.

Are you using the Free App or Pro version?

How about supplying us the library version you are using, and any other relevent version info.

I suspect it may be something in your code... How about supplying us with a sketch that doesn't work (for you) that can be tested by others here?

By the way... I have project that has 67 "elements" (LED's) and it runs just fine on ESP32 via BLE.

Give it a try.

/*
   -- LED Matrix --

   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.7.12 or later version;
     - for iOS 1.4.7 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_BLE
#include <BLEDevice.h>

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_BLUETOOTH_NAME "RemoteXY"


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,0,0,201,0,149,1,11,8,0,
  65,23,5,12,9,9,65,23,15,12,
  9,9,65,23,25,12,9,9,65,23,
  35,12,9,9,65,23,45,12,9,9,
  65,23,55,12,9,9,65,23,65,12,
  9,9,65,23,75,12,9,9,65,23,
  85,12,9,9,65,23,10,4,9,9,
  65,23,20,4,9,9,65,23,30,4,
  9,9,65,23,40,4,9,9,65,23,
  50,4,9,9,65,23,60,4,9,9,
  65,23,70,4,9,9,65,23,80,4,
  9,9,65,23,90,4,9,9,65,23,
  0,4,9,9,65,23,5,28,9,9,
  65,23,15,28,9,9,65,23,25,28,
  9,9,65,23,35,28,9,9,65,23,
  45,28,9,9,65,23,55,28,9,9,
  65,23,65,28,9,9,65,23,75,28,
  9,9,65,23,85,28,9,9,65,23,
  0,20,9,9,65,23,10,20,9,9,
  65,23,20,20,9,9,65,23,30,20,
  9,9,65,23,40,20,9,9,65,23,
  50,20,9,9,65,23,60,20,9,9,
  65,23,70,20,9,9,65,23,80,20,
  9,9,65,23,90,20,9,9,65,23,
  5,44,9,9,65,23,15,44,9,9,
  65,23,25,44,9,9,65,23,35,44,
  9,9,65,23,45,44,9,9,65,23,
  55,44,9,9,65,23,65,44,9,9,
  65,23,75,44,9,9,65,23,85,44,
  9,9,65,23,0,52,9,9,65,23,
  10,52,9,9,65,23,20,52,9,9,
  65,23,30,52,9,9,65,23,40,52,
  9,9,65,23,50,52,9,9,65,23,
  60,52,9,9,65,23,70,52,9,9,
  65,23,80,52,9,9,65,23,90,52,
  9,9,65,23,0,36,9,9,65,23,
  10,36,9,9,65,23,20,36,9,9,
  65,23,30,36,9,9,65,23,40,36,
  9,9,65,23,50,36,9,9,65,23,
  60,36,9,9,65,23,70,36,9,9,
  65,23,80,36,9,9,65,23,90,36,
  9,9 };
  
// this structure defines all the variables and events of your control interface
struct {
  // output variables
  uint8_t RGBLED[201]; // Total number of LED element references.  Eg. 67 LED elements each with Red, Green, Blue variables
} RemoteXY;

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////



void setup() {
  randomSeed(analogRead(0));
  RemoteXY_Init ();
}



void loop() {
  RemoteXY_Handler ();
  RemoteXY.RGBLED[random(202)] = random(256);  // Pick an LED variable from 0-201 and apply value 0-255
}

Yeah, was just trying to use the term that I've read.
I will post the sketch when I'm home.

Im using visuino with remotexy configuration of Bluetooth / esp32 / arduino
The output code from the remoteXY builder is as follows;

/*
   -- New TestRGB --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.6 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.8.01 or later version;
     - for iOS 1.5.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__HARDSERIAL

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,3,0,0,0,40,0,13,26,1,
  1,0,8,3,11,11,149,8,71,0,
  2,0,20,30,22,11,94,8,24,31,
  79,78,0,79,70,70,0,1,0,37,
  3,11,11,1,8,82,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t button_G; // =1 if button pressed, else =0 
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t button_r; // =1 if button pressed, else =0 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////



void setup() 
{
  RemoteXY_Init (); 
  
  
  // TODO you setup code
  
}

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


} 

7

Re: Maximum of 2 'elements'

Hello.  You do not need to quote an entire prior post tongue  Quotes, if even necessary, can be edited.

mci_ryan wrote:

The output code from the remoteXY builder is as follows

There is nothing in that code that does any actual work, so perhaps your issue lies within this Visuino thing you mentioned and whatever code or library conflicts it adds to the mix.  I don't use it nor really wish to invest time into learning something I don't need, so, sorry, I will leave this topic for others.

"And voila, which is French for.......'and then I found out.'" - Ready Player One

8 (edited by mci_ryan 2021-08-05 02:54:20)

Re: Maximum of 2 'elements'

Gunner wrote:

Hello.  You do not need to quote an entire prior post tongue  Quotes, if even necessary, can be edited.

No worries. I'm on my phone, so just trying to reply to your comment.

The linking is done is visuino. It simply imports the code to a node.. Each element that you have used in remotexy then appears with an output pin. You then connect that pin to whatever function you please, to do whatever you need it to do in visuino. 2 elements function fine. It just won't load the gui with more than 2.
You can skip through the video in the following link to see how it works (not works as in fundementally, but works as in the population of the node and its pins).
https://youtu.be/YGrovjR7QXE

I have also tried assigning the pins in remotexy and using the code directly in arduino and get the same result.

9 (edited by mci_ryan 2021-08-05 03:04:24)

Re: Maximum of 2 'elements'

This code will fail to load

/*
   -- New TestRGB --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.6 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.8.01 or later version;
     - for iOS 1.5.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__HARDSERIAL

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,3,0,0,0,40,0,13,26,1,
  1,0,8,3,11,11,149,8,71,0,
  2,0,20,30,22,11,94,8,24,31,
  79,78,0,79,70,70,0,1,0,37,
  3,11,11,1,8,82,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t button_G; // =1 if button pressed, else =0 
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t button_r; // =1 if button pressed, else =0 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_BUTTON_G 17
#define PIN_SWITCH_1 14
#define PIN_BUTTON_R 15


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_G, OUTPUT);
  pinMode (PIN_SWITCH_1, OUTPUT);
  pinMode (PIN_BUTTON_R, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_G, (RemoteXY.button_G==0)?LOW:HIGH);
  digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
  digitalWrite(PIN_BUTTON_R, (RemoteXY.button_r==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


}

This setup will function perfectly fine.
Note: I have tried different pin mapping and checked data sheets to ensure there isn't a pin that I'm mapping to, that causes the board to not work correctly. I can get any scenario of which elements/pins are left in place to function correctly when using only two functions. I.e; leave both buttons/one button & one switch/two switches/two sliders etc, and any combination of pins that are controlled.

/*
   -- New TestRGB --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.6 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.8.01 or later version;
     - for iOS 1.5.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__HARDSERIAL

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,2,0,0,0,23,0,13,26,1,
  1,0,8,3,11,11,149,8,71,0,
  1,0,37,3,11,11,1,8,82,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t button_G; // =1 if button pressed, else =0 
  uint8_t button_r; // =1 if button pressed, else =0 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_BUTTON_G 17
#define PIN_BUTTON_R 15


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_G, OUTPUT);
  pinMode (PIN_BUTTON_R, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_G, (RemoteXY.button_G==0)?LOW:HIGH);
  digitalWrite(PIN_BUTTON_R, (RemoteXY.button_r==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


}

10 (edited by Gunner 2021-08-05 07:34:54)

Re: Maximum of 2 'elements'

mci_ryan wrote:

#define REMOTEXY_MODE__HARDSERIAL

#include <RemoteXY.h>

// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600

No idea why you would use Serial for an ESP32.  WiFi or BT/BLE is what that device should use.

I tested your "failed to load" sketch with the only modification being set to WiFi over my network (the Ethernet (Wired and Wireless) setting) and it loaded just fine and toggled the LEDs I had hooked up.

https://www.dropbox.com/s/ufq20yqjdc3yn … 0.png?dl=0

"And voila, which is French for.......'and then I found out.'" - Ready Player One