Combine XIAO NRF & RemoteXY App

by Markus Opitz in Circuits > Microcontrollers

84 Views, 2 Favorites, 0 Comments

Combine XIAO NRF & RemoteXY App

XIAO_RemoteXY-Titel.jpg
IMG_6439.JPG

The XIAO nRF52840 microcontrollers from SeeedStudio are ingenious: Tiny, in some cases generously equipped, fast and economical. Ideal for drones and other remote-controlled projects. I don't always want to think up a new remote control or carry an extra device with me. That's why I like to use my smartphone as a remote control, sometimes with WiFi, sometimes with Bluetooth or BLE. RemoteXY is a great app for this, simple and customised.

Unfortunately, the connection between the app and nRF didn't work - until now. And it is so simple to fix.

Supplies

Arduino IDE

Text Editor

RemoteXY app on your mobile phone

RemoteXY App

capture_002_29102024_230834.jpg
capture_002_29102024_203518.jpg
capture_004_29102024_205700.jpg

Download the app from a store

and install it on your mobile phone.


Now you can open the webpage https://remotexy.com/ and make your own RC surface. It is very easy.

First do some configuration on the right side (Bluetooth/ nrf based board/ integrated Bluetooth/ Arduino IDE). Then drag & drop joysticks, buttons, sensors, indicators, ... to the center display.

"Get source code" and copy that to your Arduino IDE sketch.

Arduino Software & Libraries

capture_007_29102024_205925.jpg

This code from RemoteXY is not working yet. Change in your Arduino IDE code:

#define REMOTEXY_MODE__NRFCORE_BLEPERIPHERAL

to

#define REMOTEXY_MODE__ARDUINOBLE


use in your code this Bluetooth library:

#include <ArduinoBLE.h>



Open library file "RemoteXY.h" with a text editor

My library file can be found here e.g.: C:\Users\x\Documents\Arduino\libraries\RemoteXY\src\RemoteXY.h


Search for the lines

#if defined(REMOTEXY_MODE__ESP32CORE_BLUETOOTH)
#include "BluetoothSerial.h"
#elif defined(REMOTEXY_MODE__ESP32CORE_BLE)
#include "BLEDevice.h"

and add another #elif;:

#elif defined(REMOTEXY_MODE__ARDUINOBLE)
#include "ArduinoBLE.h"



Check, if there are the lines

#elif defined(REMOTEXY_MODE__ARDUINOBLE)
CRemoteXY *remotexy;
#define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, new CRemoteXYStream_ArduinoBLE (REMOTEXY_BLUETOOTH_NAME), REMOTEXY_ACCESS_PASSWORD)


are somewhere at the end of file RemoteXY.h . Save this file!

Upload your code now to your XIAO nRF52. You can find a very good description of the upload here from the manufacturer SeeedStudio.


Now you can use your XIAO nRF with the RemoteXY app. Happy making!


A Last Tip

By the way:

If the XIAO nRF should disappear from the port list... simply double-click the reset button and it will reappear.