Serial & CANopen interface
UC2 electronics have two interfaces:
- Serial (USB/UART): one-line JSON commands such as
{"task":"/motor_act",…}to a single ESP32. Every firmware build speaks it. - CANopen (500 kbit/s): between a master ESP32 (node 1) and satellite boards (motor, laser, LED, galvo, GPIO). On the HAT+ the Raspberry Pi can join the bus directly through its own CAN controller.
| You have | Talk to it with | Start here |
|---|---|---|
| Standalone board v3/v4 or a single satellite | serial JSON, Python uc2rest | First serial command |
| Raspberry Pi 5 + HAT+ (FRAME) | serial JSON to the HAT's ESP32, or CANopen on can0 with uc2canopen | CANopen from the Raspberry Pi |
| ImSwitch | ESP32Manager (serial) or UC2CANOpenManager (CAN) | Connect ImSwitch |
| A new CAN board | — | Add a CAN satellite |
Contents
| Type | Pages |
|---|---|
| Tutorials | First serial command · Python first steps · CANopen from the Raspberry Pi |
| How-to | Add a CAN satellite · Update firmware over CAN |
| Reference | Serial protocol · Serial commands · CANopen object dictionary · Boards, roles & node IDs · uc2rest · uc2canopen |
| Explanation | Architecture |
Sources
| Component | Repository | State documented |
|---|---|---|
| Firmware | youseetoo/uc2-esp32 | branch feature/strobed-sweep, 3c86acd (2026-09-30) |
| Serial client | openUC2/UC2-REST | mergemaster, 766dd4a |
| CANopen client | openUC2/UC2-REST-CANOPEN | 0.2.3 |
Items marked new (strobed sweep, laser strobe, hard homing, multi-axis TMC) are not yet on firmware main.