Arduino Due/Mega by Arduino
Firmware
Lots of pins for big robots
With Synthiam's EZB firmware, an Arduino Mega 2560 becomes a capability controller with 24 servo outputs, 13 PWM outputs, 21 digital ports, 8 analog inputs and three extra hardware serial ports, all driven from ARCx in a web browser over a single USB cable.
How the Mega works with Synthiam.
Upload the EZB-Arduino-Mega firmware (in the Firmware section below) to the Mega once with the Arduino IDE.
The Mega then speaks the EZB protocol over USB, and ARCx's Ezb Connection robot skill connects to its serial port
(COM3 on Windows, /dev/ttyACM0 or /dev/ttyUSB0 on Linux). ARC connects the same way with its EZB Connection skill.
You do not write Arduino sketches for each project: robot skills, Blockly and scripts do the work.
We recommend ARCx, which runs on Windows, Ubuntu and Raspberry Pi and is used from any web browser.
What is the Arduino Mega 2560?
The Arduino Mega 2560 is a high-I/O microcontroller board for robotics and automation projects. It stands out for its large number of pins, multiple hardware UARTs and 5 V sensor compatibility.
With the EZB firmware, ARC and ARCx can operate all of these at the same time:
- 8 ADC (analog) inputs
- 13 PWM outputs
- 21 digital I/O ports
- 24 servo outputs
- 3 hardware UARTs for GPS, RFID, motor controllers and other serial modules
That makes the Mega suitable for complex robots with many sensors, actuators, indicators and serial modules, all coordinated through the robot skills, scripts and AI in ARCx or ARC.
Arduino Mega at a glance
| Type | Microcontroller board (DIY EZB with Synthiam firmware) |
|---|---|
| Maker | Arduino |
| Microcontroller | ATmega2560 |
| Connection | USB (serial) |
| Power | USB or barrel jack |
| EZB resources | 24 servos, 13 PWM, 21 digital, 8 ADC, 3 UARTs |
| Synthiam uses it for | Robots with many servos, sensors and serial devices |
| Website | store.arduino.cc |
What you can do with a Mega in Synthiam
24 servos
Animatronics, robot arms, pan/tilt systems and legged robots. Pose and animate them with Auto Position, Servo Animation and Servo Pad.
13 PWM outputs
Speed control, LED dimming, fans and ESCs. Drive motors through an H-bridge with the Hbridge Movement Panel or set duty with the Pwm Slider.
21 digital ports
Relays, switches, LEDs and logic signals, with software serial transmit for simple UART modules. Watch and toggle them in Digital Monitor.
8 analog inputs
Potentiometers, distance sensors, light sensors, force sensors and more, read in Adc Monitor, charted in Ez Chart, or used from scripts.
3 hardware UARTs
Talk to GPS receivers, RFID readers, motor controllers and smart servos with buffered receive. Scripts use the hardware UART commands, such as UART.hardwareUartWrite().
Ultrasonic sensors
The firmware reads HC-SR04 ultrasonic distance sensors. Read one from a script with Ping.get(trigger, echo), or in ARC with the Ultrasonic Distance skill.
Blockly, JavaScript, Python
Program every port in the Script robot skill without reflashing the Mega.
Joysticks and Custom UI
Drive with an on-screen Movement Joystick or a gamepad, and build touch control screens with Custom UI.
AI agents
ARCx is an MCP server, so AI agents like Claude can see, move and program a Mega robot through its robot skills.
EZB port to Mega pin mapping
On the Mega, EZB port numbers are not the same as the Arduino pin numbers, and the mapping depends on what the port is used for. Wire each device to the pin listed for its job.
Use the map for the job. The servo, PWM and digital tables are separate maps. For example, a servo on D0 plugs into pin 22, a PWM output on D0 uses pin 2, and a digital output on D9 is pin 11 while a PWM output on D9 is pin 13.
Digital I/O and PWM outputs
ARC supports up to 24 digital I/O ports; the Mega exposes 21, mapped as D0–D20. These drive relays, switches, LEDs and logic signals, and also support software serial transmit for simple UART modules. The 13 hardware PWM channels (speed control, dimming LEDs, fans, ESCs) are mapped as D0–D12.
| EZB port | Digital I/O pin | PWM pin |
|---|---|---|
| D0 | 2 | 2 |
| D1 | 3 | 3 |
| D2 | 4 | 4 |
| D3 | 5 | 5 |
| D4 | 6 | 6 |
| D5 | 7 | 7 |
| D6 | 8 | 8 |
| D7 | 9 | 9 |
| D8 | 10 | 10 |
| D9 | 11 | 13 |
| D10 | 12 | 44 |
| D11 | 13 | 45 |
| D12 | 44 | 46 |
| D13 | 45 | — |
| D14 | 46 | — |
| D15 | 62 (A8) | — |
| D16 | 63 (A9) | — |
| D17 | 64 (A10) | — |
| D18 | 65 (A11) | — |
| D19 | 66 (A12) | — |
| D20 | 67 (A13) | — |
Servo outputs
Up to 24 servo outputs are exposed using the Mega's Servo library.
| EZB servo port | Mega pin |
|---|---|
| D0 | 22 |
| D1 | 23 |
| D2 | 24 |
| D3 | 25 |
| D4 | 26 |
| D5 | 27 |
| D6 | 28 |
| D7 | 29 |
| D8 | 30 |
| D9 | 31 |
| D10 | 32 |
| D11 | 33 |
| D12 | 34 |
| D13 | 35 |
| D14 | 36 |
| D15 | 37 |
| D16 | 38 |
| D17 | 39 |
| D18 | 40 |
| D19 | 41 |
| D20 | 42 |
| D21 | 43 |
| D22 | 68 (A14) |
| D23 | 69 (A15) |
Analog inputs (ADC)
ARC and ARCx read up to 8 analog inputs on the Mega, mapped as ADC0–ADC7.
| EZB port | Mega pin | EZB port | Mega pin |
|---|---|---|---|
| ADC0 | A0 | ADC4 | A4 |
| ADC1 | A1 | ADC5 | A5 |
| ADC2 | A2 | ADC6 | A6 |
| ADC3 | A3 | ADC7 | A7 |
Hardware serial ports
The firmware's three hardware UARTs are the Mega's extra serial ports. Its first serial port (pins 0 and 1) is the USB link to the computer, so leave it alone.
| Mega serial port | TX pin | RX pin |
|---|---|---|
| Serial1 | 18 | 19 |
| Serial2 | 16 | 17 |
| Serial3 | 14 | 15 |
The (A8)–(A15) labels in the tables are the Mega's analog header names for pins 62–69. Those pins are used here as digital and servo pins.
I/O expansion shield (recommended)
The Mega exposes raw pin headers. A sensor or servo shield adds a signal, voltage and ground pin beside every I/O pin, which makes wiring servos and sensors much easier and reduces cable strain.
A commonly used option is the KEYESTUDIO Mega Sensor Shield V1 for Arduino Mega 2560.
Servos can draw more current than the Mega's regulator or USB can supply. Power them from a separate supply sized for your servos, and connect its ground to the Mega's GND.
Connect a Mega to ARCx
- Download the firmware. Get EZB-Arduino-Mega from the Firmware section below and extract the zip to a folder.
-
Upload it with the Arduino IDE. Connect the Mega with a USB cable, open the
.inofile in the Arduino IDE, choose Tools → Board → Arduino Mega or Mega 2560 and the Mega's port, and press Upload. Write down the_BAUD_RATEvalue near the top of the sketch: ARCx must use the same baud rate. The firmware upload tutorial walks through it with pictures (it uses the Mega as its example). - Install ARCx on the computer the Mega is plugged into: Windows, Ubuntu or a Raspberry Pi running Ubuntu 24.04. Download ARCx.
-
Set the baud rate. Add the Ezb Connection robot skill (Communication category),
open its configuration, select EZB 0, open the Connection tab and set Baud rate to the firmware's
_BAUD_RATE. Save. -
Connect. Pick the Mega's serial port in the main window and press the green connect button.
Windows: COM3 (check Device Manager for the number) Linux: /dev/ttyACM0 (many clone boards: /dev/ttyUSB0) - Test. Add a Servo skill on D0 with a servo on pin 22, or toggle digital D11 (pin 13, the Mega's on-board LED) in Digital Monitor.
Using ARC instead?
Press Config on ARC's connection control, open Settings, set the baud rate for the EZB index you use for the Mega and save. Choose the Mega's COM port in the address box and press Connect. ARC lists the firmware's capabilities in its debug window.
Both work, ARCx is recommended
The Mega firmware speaks the standard EZB protocol, so it works with both of Synthiam's platforms. Start new robots in ARCx.
| ARCx Recommended | ARC | |
|---|---|---|
| Runs on | Windows 10/11 x64, Ubuntu 24.04 x64 and ARM64, Raspberry Pi 4/5 with Ubuntu 24.04 | Windows |
| User interface | Any web browser, several people at once; closing the browser leaves the robot running | Windows desktop application |
| Connection skill | Ezb Connection | EZB Connection |
| On-robot computer | A Raspberry Pi with Ubuntu 24.04 can carry ARCx and the Mega, controlled over Wi-Fi from a browser | Needs a Windows PC |
| AI agents | Built-in MCP server | Through ARC robot skills |
| Robot skill store | Both install robot skills from the Synthiam store | |
If something does not work
_BAUD_RATE in the firmware (ARCx defaults to 9600). Save, disconnect and reconnect after changing it.
If the Mega resets or never answers, try toggling Enable DTR and Enable RTS on the same tab.
dialout group, then log out and back in:
sudo usermod -aG dialout $USER
Frequently asked questions
Servo.setPosition(d0, 90, 1) for the second board.
Put all of the Mega's pins to work
Upload the EZB firmware, install ARCx, add the Ezb Connection skill, and build a robot with dozens of servos and sensors.

That’s correct - some overlap. And that shield might only go that high. It wasn’t designed but us so we don’t have control over the design, unfortunately
Thanks DJ.
i miss the days when you and your team designed the hardware.
@merne I'm still designing hardware for EZ-Robot!
I'm working on the release schedule at the moment. We hope to have new products consistently rolling out on an ongoing basis.
Sweet! @ Jeremie. I can’t wait to see what you and your team come up with. They should be awesome.
I’m going to us the Arduino mega 2560 to run my base motors and ultrasonic sensors for my Inmoov for now.
I look forward to seeing whats coming soon. I am looking to see is any new sensors will be able to added. I was even looking at possibly adding an arduino as a add-on to the EZB.
@Jeremie, I have a EZ-Robot HD servo question. Is it OK to ask you here in this forum if I start a new post? I sent a couple questions to them in the near past and got no answers back.
Hi Dave,
The best course of action would be to contact EZ-Robot directly about hardware related questions. I believe that there was an issue with the "contact us" page on the EZ-Robot website, it’s being corrected.
You can always verify if EZ-Robot has received your correspondence using the Live Chat.
Thanks Jeremie. I'll do that. I'm glad I asked.