1

Topic: Hardware serial(s)

I might be missing something simple,, (I'm new to using RemoteXY) and have been experimenting with using the Cloud Server and Access Point,, but for some reason the only connection I can get functioning is using Hardware serial (0-rx, 1-tx) with Arduino Mega 2560,
Any other (Hardware Serial1,2, or 3, Software ) doesn't work (no connection to Cloud and/or no activity on Serial monitor).
Even, when i try Wifi Access,, again only Serial (0-rx, 1-tx) results in activity on the Serial monitor and functions correctly as per the examples.
Setup is :
Wifi Access or Cloud
Arduino Mega 2560
ESP8266 Wifi module
Arduino IDE

Hopefully I'm overlooking something very simple as I've tried the other Serial ports with other programs and I know they function.

2

Re: Hardware serial(s)

so no answers or suggestions from anyone,,,
so maybe you need to see the settings the app derived ??

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD

#include <RemoteXY.h>

// RemoteXY connection settings 
#define REMOTEXY_SERIAL [b]Serial[/b]
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "mySSID"
#define REMOTEXY_WIFI_PASSWORD "mypassword"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "a big long string"

when changing Serial, to Serial1, 2, or 3,, stops working.

3 (edited by Guillaume 2020-02-21 10:52:48)

Re: Hardware serial(s)

Welcome,

Try to add in setup():

pinMode( 19, INPUT_PULLUP ); // for Serial1
pinMode( 17, INPUT_PULLUP ); // for Serial2
pinMode( 15, INPUT_PULLUP ); // for Serial3

Not sure if that will help but I had problems with Serial1,2,3 and HC-05 bluetooth module, this fixed it.

If it doesn't work then I don't know, anyway if it was me I would use the ESP as the brain and the Mega as an IO expander, because the ESP has more memory and is faster, it can do much more than the Mega.

4

Re: Hardware serial(s)

eureka!! thank you,, that was the key to success!
much appreciated Guillaume.
it functions,, but i don't see any of the activity echoed to the serial monitor when i use Serial1,2, or 3.

5

Re: Hardware serial(s)

Try add this line before #include <RemoteXY.h>:

#define REMOTEXY__DEBUGLOGS Serial1

#include <RemoteXY.h>
...

Bauds speed is 115200

6

Re: Hardware serial(s)

thanks again for the suggestion,, unfortunately it still resulted in an empty serial monitor window.
Any other ideas ?

Rob

7

Re: Hardware serial(s)

actually,, with that line added,, it doesn't connect to the cloud server when I check the status.
If I comment it out,, then it connects.