@nico78
oui mais .... RemoteXY sait déjà gérer le module BLE intégré à l'ESP32, (testé)
En étudiant la librairie fournie et en transposant à la librairie BLE des Nano 33 BLE il reste de l'espoir...
Avec le code que tu as posté plus haut au message #8 (nano 33 BLE en émulation HM-10) la compatibilité de RemoteXY avec les cartes nano 33 BLE n'est peut être pas éloignée !!
Dernière version de la libaririe RemoteXY :
Configuration :

Avoir les fichiers .h joints où l'ESP32 émule un HM-10
Voici le sketch de test qui tourne sur ESP32 avec son BLE interne
/*
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 "RemoteXY32"
// RemoteXY configurate
//unsigned char RemoteXY_CONF[] =
// { 1,0,11,0,1,5,1,0,21,2
// ,59,59,2,88,0 };
// ci dessous l'interface graphique
uint8_t RemoteXY_CONF[] =
{ 255,2,0,1,0,36,0,10,13,0,
2,0,34,8,30,17,2,26,31,31,
79,78,0,79,70,70,0,66,131,27,
36,45,19,2,24,4,0,84,8,12,
49,2,26 };
// this structure defines all the variables of your control interface
struct {
// input variable
//unsigned char button_1; // =1 if button pressed, else =0
uint8_t switch_1; // =1 if switch ON and =0 if OFF
int8_t slider_1; // =0..100 slider position
// other variable
unsigned char connect_flag; // =1 if wire connected, else =0
} RemoteXY;
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define LED_BUILTIN 22
void setup()
{
RemoteXY_Init ();
pinMode (LED_BUILTIN, OUTPUT);
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(LED_BUILTIN, (RemoteXY.switch_1==0)?LOW:HIGH);
}

RemoteXY_ESP32_BLE.ino (2.31 KB)
RemoteXYStream_BLEDevice.h (4.67 KB)
RemoteXYStream_BluetoothSerial.h (893 Bytes)