1

Topic: Compatibility with WS2812FX

Hello,

My name is Jérémie, I'm new here and I just discovered RemoteXY, it's really great and make possible a mobile APP for microcontroller ! Amazing !

In my project, I use standalone a ESP01 and I want to make led effects.
I'm trying to use this nice librairy WS2812FX : https://github.com/kitesurfer1404/WS2812FX

It works well but when I add this instruction to start it in tne loop "ws2812fx.service();" I have connection issue from the mobile phone with RemoteXY, It cannot connect anymore, there must be some conflict ? I use the ESP01 as an access point.

Can someone please have a look ?

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

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

#include <RemoteXY.h>

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


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,5,0,0,0,64,0,10,0,1,
  1,1,12,18,42,8,2,16,88,0,
  2,0,12,33,42,8,2,26,31,31,
  79,78,0,79,70,70,0,6,0,13,
  49,41,41,2,16,129,0,6,5,55,
  6,15,76,69,68,32,67,111,110,116,
  114,111,108,32,67,101,110,116,101,114,
  0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t button_1; // =1 if button pressed, else =0 
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t rgb_1_r; // =0..255 Red color value 
  uint8_t rgb_1_g; // =0..255 Green color value 
  uint8_t rgb_1_b; // =0..255 Blue color value 

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

} RemoteXY;
#pragma pack(pop)

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

#include <WS2812FX.h>
#define LED_PIN 2                       // 0 = GPIO0, 2=GPIO2
#define LED_COUNT 150
#define DEFAULT_COLOR 0xFF5900
#define DEFAULT_BRIGHTNESS 128
#define DEFAULT_SPEED 1000
#define DEFAULT_MODE FX_MODE_RAINBOW_CYCLE 

String modes = "";
uint8_t myModes[] = {}; // *** optionally create a custom list of effect/mode numbers
boolean auto_cycle = false;

WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);


void setup() 
{
  RemoteXY_Init (); 
  
  ws2812fx.init();
  ws2812fx.setMode(DEFAULT_MODE);
  ws2812fx.setColor(DEFAULT_COLOR);
  ws2812fx.setSpeed(DEFAULT_SPEED);
  ws2812fx.setBrightness(DEFAULT_BRIGHTNESS);
  ws2812fx.start();
  
  // TODO you setup code
  
}

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

2 (edited by Nokero 2020-11-18 10:18:05)

Re: Compatibility with WS2812FX

I would like to know the answer to your problem too. I am new to RemoteXY and still learning. I like to spend some time every evening at my property in Spain here discovering new things about it and reading related forums and news.