Updating the Firmware
Hackerbot contains four microcontrollers responsible for essential real-time control tasks—such as SLAM base locomotion, expressive audio-visual output on the head, and precise control of the arm and
Hackerbot contains four microcontrollers responsible for essential real-time control tasks—such as SLAM base locomotion, expressive audio-visual output on the head, and precise control of the arm and gripper mechanisms.
All of the microcontrollers used are identical Adafruit QT PY SAMD21 Arduino boards (Adafruit QT Py - SAMD21 Dev Board with STEMMA QT).
In order to program updated firmware versions you will need:
USB-C Data cable
On your computer you will need:
Hackerbot Firmware Files
Arduino IDE
Required Libraries
SerialCmd Library Modification
The first section below describes how to set up the programming software on your computer and then the following four sections after that describe how to update the firmware on each of the four microcontrollers. The final section describes how to update the firmware for the eyes on the Hackerbot Head.
Arduino IDE, Board, Library, and Library Modification Setup
🔹 Step 1 – Install Arduino IDE
Download and install the latest version of the Arduino IDE (v2.3.4) for your operating system. During installation, make sure to include all drivers when prompted.
🔹 Step 2 – Add Adafruit Board Support
Open the Arduino IDE.
Go to Settings (via the gear icon or
File > Preferences
).In the Additional Board Manager URLs field, paste the following URL:
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
🔹 Step 3 – Install Adafruit SAMD Boards
Click the Boards Manager icon (second icon on the left panel).
In the search/filter box, type:
adafruit
Install the package: Adafruit SAMD Boards by Adafruit

🔹 Step 4 – Install Required Libraries
Click the Libraries icon (third icon down on the left panel) and search for and install each of the following libraries:
Adafruit Arcada Library by Adafruit (Install all dependencies when prompted)
STM32duino VL53L7CX
SerialCmd by Guglielmo Braguglia
Dynamixel2Arduino by ROBOTIS
🔹 Step 5 – Modify SerialCmd and RingBuffer Libraries
Due to Hackerbot’s command processing requirements, you’ll need to modify some internal constants in the libraries:
🛠️ Modify SerialCmd.h
Navigate to the following directory based on your OS:
Windows:
C:\Users\<username>\Documents\Arduino\libraries\SerialCmd\src\
macOS:
/Users/<username>/Documents/Arduino/libraries/SerialCmd/src/
Linux:
/home/<username>/Arduino/libraries/SerialCmd/src/
Edit SerialCmd.h
and update lines 80–82 to:
#define SERIALCMD_MAXCMDNUM 60 // Max Number of Command
#define SERIALCMD_MAXCMDLNG 32 // Max Command Length
#define SERIALCMD_MAXBUFFER 128 // Max Buffer Length
🛠️ Modify RingBuffer.h
Navigate to the core Arduino files directory:
Windows:
C:\Users<username>\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.10\cores\arduino\
macOS:
/Users/<username>/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino/
Linux:
/home/<username>/.arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino/
Edit RingBuffer.h
and update line 32:
#define SERIAL_BUFFER_SIZE 1024
Your development environment is now fully configured. You can proceed to the next sections to upload firmware to each microcontroller.
Firmware Upload Instructions
Each Hackerbot unit contains up to four microcontrollers, depending on the model (Lite, AI, AI Pro, AI Elite). The following sections describe how to upload firmware to each controller.
⚠️ IMPORTANT: Always disconnect power before plugging in your USB-C cable. Be extremely careful with USB and power cable polarity to avoid damaging the hardware.
🧠 Main Controller Firmware
Present on: All models (Lite, AI, AI Pro, AI Elite)
Steps:
Power Down
Unplug the battery from the Main Controller.
Hold the power button on the SLAM base for ~7 seconds until the robot says “Goodbye.”
[AI Pro & AI Elite Only] Disconnect Head
Unplug the head's USB Audio and Camera connections from the Raspberry Pi 5.
Remove the 4 head-mounting screws using a PH2 screwdriver.
Gently place the head in front of the robot.

Using a PH2 philips head screw driver, remove the four screws securing the head to the base and very carefully place the head in front of the robot


Connect USB-C
AI models: Unplug the right-angle USB-C between the RPi5 and Main Controller.
Lite model: You may need to remove the battery to access the USB-C port.
Carefully connect your USB-C data cable from your computer to the Main Controller.


Connect your USB-C programming cable from your computer to the Main Controller. On the Lite model you may need to remove the battery. On all other models, plug into the right angle connector.

Get Firmware
Download or clone the latest main controller firmware from the Hackerbot GitHub repo.
Upload in Arduino IDE
Open
main_controller.ino
Select "Adafruit QT Py M0" in the board dropdown.
Ensure the USB cable is fully inserted and data-capable.
Click the Upload icon (right-pointing arrow).


Reassemble
Unplug the USB-C cable.
Reconnect the RPi to Main Board USB-C cable
Reconnect head components (if applicable).
Place the head back on the mount (make sure the I2C/power cable runs out the back)
Screw down the head using the 4 screws and your PH2 screwdriver
Plug the USB to Audio and Camera USB plugs back into the RPi
Plug the power cable back in — double-check polarity.
🤖 Dynamixel Controller Firmware (Head)
Present on: AI Pro, AI Elite
Steps:
Power Down
Unplug the battery from the extension cable.
Turn off the SLAM base (hold power ~7 sec).
Connect USB-C
Connect your USB-C data cable to the top USB-C port on the Hackerbot Head.

Get Firmware
Download or clone
dynamixel_controller.ino
from the repo.
Upload in Arduino IDE
Open the file and select "Adafruit QT Py M0" as the board.
Click the Upload icon.


Finish
Unplug the USB-C cable.
Reconnect power — check polarity carefully.
🎤 Audio / Mouth / Eyes Firmware (Head)
Present on: AI Pro, AI Elite
Steps:
Power Down
Unplug battery and shut down the SLAM base.
Connect USB-C
Plug your USB-C cable into the bottom USB-C port on the Hackerbot Head.

Get Firmware
Download or clone
audio_mouth_eyes.ino
from the repo.
Upload in Arduino IDE
Open the file, select "Adafruit QT Py M0", and click Upload.


Finish
Unplug the USB-C cable.
Reconnect power — verify polarity.
🦾 Arm Controller Firmware
Present on: AI Elite only
Steps:
Power Down
Unplug the battery extension cable.
Power off the SLAM base.
Connect USB-C
Connect your USB-C data cable to the back of the arm base.

Get Firmware
Download or clone
arm_controller.ino
from the repo.
Upload in Arduino IDE
Open the file, select "Adafruit QT Py M0", and click Upload


Finish
Unplug USB-C.
Reconnect power — check polarity.
👀 Eyes Firmware
📌 Coming Soon Expanded instructions for programming the Eyes controller will be added shortly.
In the meantime, refer to the Eyes Programming Guide in the Eye Firmware repository.
Last updated