So in my digging through the code, I've been trying to find where the Arduino Mega hardware serial is set up. From the web interface you have 4 choices Serial 0 - 3, each with their own set of pins defined.
Serial, pins 0(RX) and 1(TX)
Serial1, pins 19(RX) and 18(TX)
Serial2, Pins 17(RX) and 16(TX)
Serial3, Pins 15(RX) and 14(TX)
I selected Hardware 3 just to see what the code looked like to see if it was just a matter of changing the Pin names in the sketch. The Software pin names are defined in the sketch itself.
#define REMOTEXY_MODE__HARDSERIAL
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial3
#define REMOTEXY_SERIAL_SPEED 9600
In this it seems that somewhere in the library Serial3 would define the Pin names. As opposed to softserial:
#define REMOTEXY_MODE__SOFTSERIAL
#include <SoftwareSerial.h>
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX A10
#define REMOTEXY_SERIAL_TX A11
#define REMOTEXY_SERIAL_SPEED 9600
I have tried defining the pin names with Hardware Serial, but get an error. I was hoping the error would lead my to a place in the library where I could modify it enough to accept the pin names for RX and TX, but alas that is a deep and dark rabbit hole and I am but a novice programmer.
What I am really hoping to be able to set up for the STM32F103c is simply the pin names to see if at that point I can use RemoteXY with my new choice of boards:
Pin Names
TX1 pin = PA9
RX1 pin = PA10
TX2 pin = PA2
RX2 pin = PA3
TX3 pin = PB10
RX3 pin = PB11
Is it possible to include these names somewhere within the library to call them in Hard Serial?
I would really like to keep using RemoteXY to design bluetooth interfaces for my projects. I recently setup 2100 WS2812B LEDs on an Art Car and had 2 different bluetooth interfaces for them. This meant the person I completed the project for purchased the full version of RemoteXY. I have one project pending that uses the STM32 board because it has more memory and an internal RTC. There are many patterns and color variants the user can select via bluetooth. The full version RemoteXY makes that all possible and easy to create. It would be GREAT to be able to use it with the STM32F103c board.
I know if worse comes to worse I can throw in an Arduino Nano to handle the RemoteXY and then send commands over to the STM32 board, but it would be so much nicer to just have one board considering how much more capable the STM32 boards are.