Voice Activity Detection icon Voice Activity Detection Real-time microphone VAD using FFT to detect speech start/end and trigger scripts, with live level graph and sensitivity tuning Try it →
Asked

Mega 2560 GPS UART Conflict

I’m running an Arduino Mega 2560 over USB with ARC’s Arduino firmware and trying to add a NEO-6M GPS module. I first tried the GPS robot skill (by James Graham Hu) and noticed it says it auto-initializes UART port 0 at 9600. On the Mega, Serial0 is the same USB link ARC uses, and as soon as I wired the GPS to pins 0/1 the ARC connection started dropping and the GPS Status stayed red "disconnected". I moved the GPS to hardware Serial1 (GPS TX -> Mega RX1/D19, GPS RX -> Mega TX1/D18, 5V and GND solid, PPS LED blinking), and I can confirm NMEA output at 9600 from Serial1 using a quick passthrough test outside ARC, so the module is fine. In ARC, though, the GPS skill still appears locked to UART0 and never populates data. I also tried the BN-880 GPS-Compass skill, but I’m not sure how to point it at the Mega’s Serial1 (and I don’t want to lose the USB connection on Serial0). Is there a way to use the GPS or BN-880 GPS-Compass skills with the Mega’s Serial1/2/3 under ARC’s Arduino connection so the GPS data comes through without hijacking UART0, and if so what UART port setting or mapping should I select in the skill?



Related Hardware (view all EZB hardware)
Synthiam ARC enables Arduino Mega 2560 control with 8 ADC, 13 PWM, 21 digital ports and 24 servos; includes firmware, shield and tutorials
USB
Servos 24
Camera
Audio
UART 3
I2C
ADC 8
Digital 21

Related Robot Skill (view all robot skills)
Standalone autonomous navigation using Beitian BN-880 GPS/Compass with real-time map waypointing and offline map caching; requires Arduino.

ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

Author Avatar
PRO
Canada
Twitter YouTube GitHub
#1  

Yes - on the Mega 2560 Arduino EZB firmware, UART0 is the USB/ARC link, so a GPS skill that auto-initializes UART0 will conflict with the ARC connection if you wire the GPS to pins 0/1.

What’s happening

  • Serial0 / UART0 on the Mega is used by ARC over USB.
  • If a robot skill initializes UART0 at 9600, it can interfere with the USB connection.
  • Your move to Serial1 was the right idea:
    • Serial1 RX = D19
    • Serial1 TX = D18

The catch

Not all ARC robot skills expose a setting to choose which UART they use.
If the GPS skill is hardcoded to UART0, then it will keep trying to talk to the USB port instead of Serial1/2/3.

For the BN-880 GPS-Compass skill

That skill expects the BN-880 to be connected to an Arduino running its own firmware/project, and the Arduino is connected to ARC over USB. It does not appear to be designed as a generic "pick any Mega UART" skill from the ARC side. In most cases, it uses the Arduino’s Serial1 in the companion firmware, but that depends on the provided firmware code.

Your options

Option 1: Use a custom ARC skill

If the current GPS skill does not let you choose the UART, the cleanest solution is to create or modify a skill that reads from:

  • UART1 for Serial1
  • UART2 for Serial2
  • UART3 for Serial3

In ARC JavaScript, that would look like:

UART.initHardwareUart(1, 9600);
sleep(100);

var data = UART.hardwareUartReadStringAvailable(1);
print(data);

That reads from hardware UART 1 on the Mega, which corresponds to Serial1.

Option 2: Modify the skill/firmware

If the GPS robot skill is using UART0 internally, it would need to be updated to use UART1 instead. If you’re comfortable editing the code, that’s the right fix.

Option 3: Use the BN-880 skill with its supplied Arduino firmware

If you want the BN-880 GPS-Compass skill, follow its supplied wiring/firmware approach and keep ARC on USB. The Arduino firmware handles the sensor over Serial1/I2C, while ARC only talks to the Arduino over USB.

Mega UART mapping in ARC

On the Mega firmware, the hardware UART indexes are typically:

  • UART0 = Serial0 = USB/ARC
  • UART1 = Serial1
  • UART2 = Serial2
  • UART3 = Serial3

So if a skill allows selection, you’d want:

  • UART1 for your GPS module on pins 18/19

Important wiring note

For GPS modules:

  • GPS TX Mega RX1 (D19)
  • GPS RX Mega TX1 (D18)
  • VCC 5V if your breakout supports 5V
  • GND GND

Best next step

If you want, I can help you with one of these:

  1. Write an ARC JavaScript example that reads NMEA from UART1 / Serial1
  2. Check whether the GPS skill has a kebab-menu setting for UART selection
  3. Help you build a small custom robot skill that reads the NEO-6M on Serial1

If you can share the exact GPS skill name/version or a screenshot of its settings menu, I can tell you whether it has a UART selector or if it’s hardcoded to UART0.

I am a customer support AI and still learning. Please verify important answers in our support documentation. For advanced AI features, use the AI Script Agent built into ARC.