UIROBOT Code Examples Overview

A comprehensive overview of UIROBOT code examples for all supported platforms — Windows, Linux, Arduino, STM32, and Raspberry Pi.

UIROBOT provides a wide range of code examples and SDK packages to help you quickly integrate our products into your projects. Below is a complete overview organized by platform and connection method. --- ## Quick Selection Guide | Your Platform | Connection Method | Compatible Products | Language | |---------------|-----------------|-------------------|----------| | **PC (Windows)** | UIM2513 / UIM2523 Gateway → CAN Bus | Motors, I/O Modules | C#, C++, Python | | **MMC904S (Linux)** | Built-in CAN Bus | Motors | C++ (SDK + QT) | | **Raspberry Pi 4** | UI-MCP2515 SPI → CAN Bus | Motors | C | | **Raspberry Pi 5** | UIM2523 Gateway → CAN Bus | Motors | C++ | | **Arduino UNO** | UI-MCP2515 SPI → CAN Bus | Motors | C++ | | **Arduino Ethernet** | UIM2523 Gateway → CAN Bus | Motors | C++ | | **Arduino UNO** | Direct Wiring (Pulse-Direction) | PM Series Motors | C++ | | **STC89C52** | UIM2513 Gateway → CAN Bus | Motors | C | | **STM32** | UI-MCP2515 SPI → CAN Bus | Motors | C | | **STM32** | Direct Wiring (Pulse-Direction) | PM Series Motors | C | --- ## 1. PC (Windows) — via Gateway to CAN Bus Connect your PC to UIROBOT CAN bus motors using the **UIM2513** (RS232-CAN) or **UIM2523** (Ethernet-CAN) gateway. The UIROBOT SDK provides ready-to-use C#, C++, and Python examples. ### C# Examples (with libUirSdk) | Download | Description | |----------|-------------| | [Win32_C#_libUirSdkWin32_UIM342_AN250928.zip](https://www.uirobot.com/uploads/files/Win32_C%23_libUirSdkWin32_UIM342_AN250928.zip) | UIM342 motor control — 32-bit | | [Win64_C#_libUirSdkWin64_UIM342_AN250929.zip](https://www.uirobot.com/uploads/files/83be717bbdca18680064accc0c34ca87.zip) | UIM342 motor control — 64-bit | | [Win32_C#_libUirSdkWin32_UIM1616_AN251031.zip](https://www.uirobot.com/uploads/files/Win32_C%23_libUirSdkWin32_UIM1616_AN251031.zip) | UIM1616 I/O module — 32-bit | | [Win64_C#_libUirSdkWin64_UIM1616_AN251112.zip](https://www.uirobot.com/uploads/files/Win64_C%23_libUirSdkWin64_UIM1616_AN251112.zip) | UIM1616 I/O module — 64-bit | ### C++ Examples (with libUirSdk) | Download | Description | |----------|-------------| | [Win32_Cpp_libUirSdkWin32_UIM342_AN250821.zip](https://www.uirobot.com/uploads/files/Win32_Cpp_libUirSdkWin32_UIM342_AN250821.zip) | UIM342 motor control — 32-bit | | [Win64_Cpp_libUirSdkWin64_UIM342_AN250822.zip](https://www.uirobot.com/uploads/files/edca53197b92f7ad3258773be7a3215e.zip) | UIM342 motor control — 64-bit | | [Win32_Cpp_libUirSdkWin32_UIM342_Six_Motors_AN251105.zip](https://www.uirobot.com/uploads/files/Win32_Cpp_libUirSdkWin32_UIM342_Six_Motors_AN251105.zip) | 6-axis UIM342 control | | [Win32_Cpp_libUirSdkWin32_UIM342BuiltIn2_AN250915.zip](https://www.uirobot.com/uploads/files/274d6b862bc67d1c4c2bcc9a1c3c4d65.zip) | UIM342 built-in ID=2 — 32-bit | | [Win64_Cpp_libUirSdkWin64_UIM342BuiltIn2_AN250916.zip](https://www.uirobot.com/uploads/files/58038951ba35ed1f5d98efe672dcfd97.zip) | UIM342 built-in ID=2 — 64-bit | | [Win32_Cpp_libUirSdkWin32_UIM1616_AN251030.zip](https://www.uirobot.com/uploads/files/Win32_Cpp_libUirSdkWin32_UIM1616_AN251030.zip) | UIM1616 I/O module — 32-bit | | [Win64_Cpp_libUirSdkWin64_UIM1616_AN251111.zip](https://www.uirobot.com/uploads/files/Win64_Cpp_libUirSdkWin64_UIM1616_AN251111.zip) | UIM1616 I/O module — 64-bit | ### C++ / Python — Serial (Gateway) | Download | Description | |----------|-------------| | [Win32_Cpp_Serial_Messge_UIM2513_AN251021.zip](https://www.uirobot.com/uploads/files/Win32_Cpp_Serial_Messge_UIM2513_AN251021.zip) | UIM2513 serial communication — C++ | | [Windows_Python_Serial_Messge_UIM2513_AN251219.zip](https://www.uirobot.com/uploads/files/Windows_Python_Serial_Messge_UIM2513_AN251219.zip) | UIM2513 serial communication — Python | --- ## 2. MMC904S (Linux) — Built-in CAN to Motors Control CAN bus motors directly from the UIROBOT MMC904S mini-PC running Linux. | Download | Description | |----------|-------------| | [DEMO_MMC_3x342.zip](https://www.uirobot.com/uploads/files/851ca2aac2177dbc5f8f199b275048c8.zip) | 3x UIM342 control with C++ SDK + QT UI | --- ## 3. Raspberry Pi 4 — via UI-MCP2515 to CAN Bus Connect a Raspberry Pi 4 to CAN bus motors using the **UI-MCP2515** SPI-to-CAN module. | Download | Description | |----------|-------------| | [RaspberryPi_C_Mcp2515_UIM342_AN260320.zip](https://www.uirobot.com/uploads/files/RaspberryPi_C_Mcp2515_UIM342_AN260320.zip) | UIM342 basic control | | [RaspberryPi_C_Mcp2515_UIM342_ChangeNodeID_AN260321.zip](https://www.uirobot.com/uploads/files/RaspberryPi_C_Mcp2515_UIM342_ChangeNodeID_AN260321.zip) | UIM342 change Node ID | | [RaspberryPi_C_Mcp2515_UIM342_Multiple_AN260322.zip](https://www.uirobot.com/uploads/files/RaspberryPi_C_Mcp2515_UIM342_Multiple_AN260322.zip) | UIM342 multi-motor control | --- ## 4. Raspberry Pi 5 — via UIM2523 Gateway Connect a Raspberry Pi 5 to CAN bus motors using the **UIM2523** Ethernet-CAN gateway and Visual Studio + Visual GDB. | Download | Description | |----------|-------------| | [RasPI5_X32_Cpp_UIM342_Console_AN250814.zip](https://www.uirobot.com/uploads/files/3f01f49c6e00e951eef4d448beaf5529.zip) | UIM342 console — 32-bit | | [RasPI5_X64_Cpp_UIM342_Console_AN250813.zip](https://www.uirobot.com/uploads/files/fb4150ecc44f101b634ae3abc35c0c5d.zip) | UIM342 console — 64-bit | | [RasPI5_X32_Cpp_UIM342_Console_makefile_project_AN250814.zip](https://www.uirobot.com/uploads/files/RasPI5_X32_Cpp_UIM342_Console_makefile_project_AN250814.zip) | UIM342 console — Makefile project | --- ## 5. Arduino UNO — via UI-MCP2515 to CAN Bus Connect an Arduino UNO to CAN bus motors using the **UI-MCP2515** SPI-to-CAN module. | Download | Description | |----------|-------------| | [Arduino_Cpp_Mcp2515_UIM342_AN250901.zip](https://www.uirobot.com/uploads/files/Arduino_Cpp_Mcp2515_UIM342_AN250901.zip) | UIM342 basic control | | [Arduino_Cpp_Mcp2515_UIM342_ChangeNodeID_AN250902.zip](https://www.uirobot.com/uploads/files/Arduino_Cpp_Mcp2515_UIM342_ChangeNodeID_AN250902.zip) | UIM342 change Node ID | | [Arduino_Cpp_Mcp2515_UIM342_Multiple_AN250903.zip](https://www.uirobot.com/uploads/files/5019760d5da5aa92d6a72ffccda72ad6.zip) | UIM342 multi-motor control | --- ## 6. Arduino Ethernet — via UIM2523 Gateway Connect an Arduino with Ethernet shield to CAN bus motors using the **UIM2523** Ethernet-CAN gateway. | Download | Description | |----------|-------------| | [ArduinoETH_Cpp_UIM2523_UIM342_AN250906.zip](https://www.uirobot.com/uploads/files/ArduinoETH_Cpp_UIM2523_UIM342_AN250906.zip) | UIM2523 + UIM342 basic control | | [ArduinoETH_Cpp_UIM2523_UIM342_Multiple_AN260415.zip](https://www.uirobot.com/uploads/files/ArduinoETH_Cpp_UIM2523_UIM342_Multiple_AN260415.zip) | UIM2523 + UIM342 multi-motor control | | [ArduinoETH_Cpp_UIM2523_UIM342_SetIP_AN250907.zip](https://www.uirobot.com/uploads/files/ArduinoETH_Cpp_UIM2523_UIM342_SetIP_AN250907.zip) | UIM2523 IP configuration | --- ## 7. Arduino UNO — Direct Wiring (Pulse-Direction) Connect an Arduino UNO directly to **PM Series** (UIM344) motors using pulse-direction control signals. | Download | Description | |----------|-------------| | [Arduino_Cpp_UIM344_AN250904.zip](https://www.uirobot.com/uploads/files/Arduino_Cpp_UIM344_AN250904.zip) | UIM344 basic control | | [Arduino_Cpp_UIM344_HighSpeed_AN250911.zip](https://www.uirobot.com/uploads/files/Arduino_Cpp_UIM344_HighSpeed_AN250911.zip) | UIM344 high-speed control | | [Arduino_Cpp_UIM344_Multiple_AN250905.zip](https://www.uirobot.com/uploads/files/Arduino_Cpp_UIM344_Multiple_AN250905.zip) | UIM344 multi-motor control | --- ## 8. STC89C52 — via UIM2513 Gateway to CAN Bus Connect an STC89C52 microcontroller to CAN bus motors using the **UIM2513** RS232-CAN gateway and Keil uVision5. | Download | Description | |----------|-------------| | [STC89C52_C_UIM2513_UIM342_AN250915.zip](https://www.uirobot.com/uploads/files/STC89C52_C_UIM2513_UIM342_AN250915.zip) | UIM342 basic control | | [STC89C52_C_UIM2513_UIM342_ChangeNodeID_AN250916.zip](https://www.uirobot.com/uploads/files/STC89C52_C_UIM2513_UIM342_ChangeNodeID_AN250916.zip) | UIM342 change Node ID | | [STC89C52_C_UIM2513_UIM342_Multiple_AN250917.zip](https://www.uirobot.com/uploads/files/STC89C52_C_UIM2513_UIM342_Multiple_AN250917.zip) | UIM342 multi-motor control | --- ## 9. STM32 — via UI-MCP2515 to CAN Bus Connect an STM32 evaluation board to CAN bus motors using the **UI-MCP2515** SPI-to-CAN module. | Download | Description | |----------|-------------| | [Stm32_C_UIM342_AN250908.zip](https://www.uirobot.com/uploads/files/Stm32_C_STLink_UIM342_AN250908.zip) | UIM342 basic control | | [Stm32_C_UIM342_ChangeNodeID_AN250909.zip](https://www.uirobot.com/uploads/files/Stm32_C_STLink_UIM342_ChangeNodeID_AN250909.zip) | UIM342 change Node ID | | [Stm32_C_UIM342_Multiple_AN250910.zip](https://www.uirobot.com/uploads/files/Stm32_C_STLink_UIM342_Multiple_AN250910.zip) | UIM342 multi-motor control | --- ## 10. STM32 — Direct Wiring (Pulse-Direction) Connect an STM32 evaluation board directly to **PM Series** (UIM344) motors using pulse-direction control signals. | Download | Description | |----------|-------------| | [Stm32_C_UIM344_AN250912.zip](https://www.uirobot.com/uploads/files/Stm32_C_STLink_UIM344_AN250912.zip) | UIM344 basic control | | [Stm32_C_UIM344_HighSpeed_AN250913.zip](https://www.uirobot.com/uploads/files/Stm32_C_STLink_UIM344_HighSpeed_AN250913.zip) | UIM344 high-speed control | | [Stm32_C_UIM344_Multiple_AN250914.zip](https://www.uirobot.com/uploads/files/Stm32_C_STLink_UIM344_Multiple_AN250914.zip) | UIM344 multi-motor control | --- ## Related Documents - [Python CAN Bus Examples](/docs/python-examples) - [Arduino CAN Bus Examples](/docs/arduino-examples) - [Quick Start Guide](/docs/quick-start) --- *Last updated: 2026-06-25 | Source: [uirobot.com/codeexample](https://www.uirobot.com/codeexample.html)*