Setup Arduino IDE
Arduino IDE stands out with it's simple design, allowing to write a code, compile a project and upload it to the RoboBoard X4. This is one of the reasons why it's so popular among beginners. Aside from basic functionality, it has thousands of third-party libraries and code examples to create a project even faster.
Step 1. Download Arduino IDE
Go to Arduino website to download application for your operating system.
For this tutorial select version 1.8.x (not 2.0).
Install guide: Windows | macOS | Linux
Step 2. Install Totem Boards
Install
Totem Boards
extension to add support for RoboBoard X4.
- In Arduino IDE select
File
→Preferences
. - Locate
Additional Boards Manager URLs
and paste in:
If you have multiple URLs, click a button next to input field and add this link to the bottom.https://totemmaker.github.io/TotemArduinoBoards/package_totemmaker_index.json
- Click OK.
- Select
Tools
→Board
→Boards Manager..
- In search field type in
totem
. - Click Install on
Totem Boards
and wait for it to complete. It can take a few minutes. - Close Boards Manager window.
- Select
Tools
→Board
→Totem Boards
→RoboBoard X4
.
Step 3. Compile and upload code
Load example code and upload it to RoboBoard X4.
- Select
File
→Examples
→Board
→RGB
→SetColor
. - Connect X4 board to PC over USB cable and power it on.
Make sure the battery or DC jack is connected and power switch is turned on.
X4 won't work from USB alone! - Select
Tools
→Port
and click on the port displayed there.
IfPort
is not available - check if X4 is on and plugged to PC with USB cable.
If there are multiple ports, select one with (ESP32 USB) or disconnect USB cable and check which one is gone. Reconnect and select it. - Select
Sketch
→Upload
and wait till it completes (can take a few minutes first time). - RoboBoard X4 RGB will start to blink in different colors. There is an example for each functionality, including a simple description.
Step 4. Update internal driver
Burn Bootloader (Driver update)
Do not use this functionality at the moment!
It will brick revision v1.1 boards! Only safe to use with (older) revision v1.0.
We have fixed this issue but measures are taken to prevent damaging already sold units. If you have non-functioning board - please contact support.
Update internal driver to the latest version. Only required once!
Function Serial.println(X4.getDriverVersion())
should output 1.52
.
SelectTools
→Board
→Totem Boards
→RoboBoard X4
.SelectTools
→Port
and click on the port displayed there.Select.Programmer
→ESPTool
Click.Tools
→Burn Bootloader
Wait till board is flashed and RGB turns on green. It means driver is updated.
If RGB turned on red - contact our forum or support.Now upload any other code as in Step 3.
Step 5. Using Arduino IDE
For more information about getting started with Arduino, read following topics:
- Arduino IDE usage guide
- How to install libraries
- Using Serial Monitor
- Arduino code documentation
- RoboBoard X4 code documentation
- RoboBoard X4 code examples
- General Arduino examples
Question
If you encountered any problem - create a topic on our community forum.totemmaker.net.