1

Topic: RemoteXY compatible with PlatformIO & Visual Studio Code?

Hi,

I'm evaluation to leave Arduino IDE for VSD who offers much more features for faster development.

Remote XY is a real MUST for my projects. Before spending lot of time to learn VS Code for nothing, I prefer to ask a stupide question:

Is there anybody who has ever try VSD with RemoteXY?

2 (edited by Guillaume 2019-06-17 04:15:29)

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

Welcome,

What is VSD ? I use PlatformIO with VS Code, no problem for RemoteXY, except some compile warnings...

And now that the RemoteXY library is available on Github, you don't even need to install it, just add in your project's platformio.ini

lib_deps =
    https://github.com/RemoteXY/RemoteXY-Arduino-library

3

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

VSD was a tipo mistake. It is all about VS Code.

That's a good new! I'm gonna to give a try to PlatformIO.

Merci bien Guillaume.

4 (edited by KissInno 2019-06-23 20:53:19)

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

VSCode looks really great but I'm having issue to make my first(easy) Remotexy project working, even with Lib added into PlateformIO.ini

I'm getting these errors:
'RemoteXY_Init' w
'RemoteXY_Init' was not declared in this scope
'RemoteXY_Handler
'RemoteXY_Handler' was not declared in this scope

Anybody who could share a basic RemoteXY project for PlateformIO VSCode?

Thanks for your support.

5

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

Show your main.cpp and platformio.ini file

6

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = https://github.com/RemoteXY/RemoteXY-Arduino-library

Main.cpp

#include <Arduino.h>
/*
  RemoteXY example.
  Smartphone connect via BLE on ESP32.
  This shows an example of using the library RemoteXY.
  In the example you can control the LED pin 2 using the button on the
  smartphone. The example uses the BluetoothSerial library which is a standard
  library in the Arduino IDE on ESP32.
 
  Download the mobile app from the
  website: http://remotexy.com/download/ for connect this sketch.
 
  Use the website http://remotexy.com/ to create your own management
  interface your arduino with your smartphone or tablet.
  You can create different management interfaces. Use buttons,
  switches, sliders, joysticks (g-sensor) all colors and sizes
  in its interface. Next, you will be able to get the sample
  code for arduino to use your interface for control from a
  smartphone or tablet. You will not need to re-install the
  android app, as it will determine which interface you have
  downloaded the arduino.
 
*/

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

// #define REMOTEXY__DEBUGLOGS Serial

// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP32_BLE
// #include <RemoteXY.h>

// RemoteXY connection settings
#define REMOTEXY_BT_DEVICENAME "RemoteXY"

// RemoteXY configurate
unsigned char RemoteXY_CONF[] =
  { 1,0,11,0,1,5,1,0,21,2
  ,59,59,2,88,0 };
   
// this structure defines all the variables of your control interface
struct {

    // input variable
  unsigned char button_1; // =1 if button pressed, else =0

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

} RemoteXY;

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

#define LED_BUILTIN 2

void setup() 
{
  RemoteXY_Init (); 
   
  pinMode (LED_BUILTIN, OUTPUT);
   
}

void loop() 

  RemoteXY_Handler ();
   
  digitalWrite(LED_BUILTIN, (RemoteXY.button_1==0)?LOW:HIGH);

}


+++++++++++++++++++

7

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

You need to #include <RemoteXY.h>

8

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

Thanks for this mistake: #include <RemoteXY.h>

I also had to change platformio.ini:
lib_deps = https://github.com/FedericoBusero/RemoteXY   // Modified Lib to include ESP32.


(lib_deps = https://github.com/RemoteXY/RemoteXY-Arduino-library does not include ESP32 examples, ESP8266).

9

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

Yes, original library works with ESP32 but only with WiFi

10

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

None of the ESP32 examples seems to work under VSCode PlatformIO :-(

I'm always getting the same 3 errors.

2 errors in Lib:
uninitialized const 'RemoteXY_CONF_PROGMEM' [-fpermissive]
'RemoteXY_CONF_PROGMEM' does not name a type

1 error in Main:
storage size of 'RemoteXY_CONF_PROGMEM' isn't known

But from Arduino IDE, Lib & Example are running fine.

Any help here?

11

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

This is all solved thanks to Guillaume.
http://forum.remotexy.com/viewtopic.php?id=894

12

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

I'd like to use the new Online Graph feature with 2.4.3 (14.11.2019) with ESP32 Wifi but no way to compile from VS Code.

Arduino IDE does compile official Lib 2.4.3 but PlatformIO definitively does not want to compile :-(

Would be really great if FedericoBusero could upgrade its Remotexy-master lib (based on 2.3.5) as it is supported by VSC.

lib_deps = https://github.com/FedericoBusero/RemoteXY   // Modified Lib to include ESP32.

13 (edited by KissInno 2020-02-24 19:25:07)

Re: RemoteXY compatible with PlatformIO & Visual Studio Code?

Hi Federico,

Thanks for your reply :-)

For an unknown reason, I'm not able to compile the official lib 2.4.3 from PlatformIO VS Code. Strange is that Guillume can do it without problem.

I faced the SAME problem with the previous official 2.3.5 (30.10.2018) while YOUR remotexy-master could compile smoothly.

Therefore I asked you to update your lib. But since, Guillaume can compile lib 2.4.3 from VS Code, which was itself a VERY good new, I'm gonna to keep fighting with official 2.4.3 & VS Code.

Here again, Guillaume solved my problem who was a conflict with another lib, <WiFi> 1.0 vs <WiFiEspAT> 1.1.1: http://forum.remotexy.com/viewtopic.php?id=904

Thanks to both of you again for all your very valuable contributions to Remotexy.