Compiling the Arduino sketch
Compiling Arduino sketch
To update or customize the firmware, you need to compile and upload the STEP-series firmware Arduino sketch. Roughly there are two methods.
- Compiling from PlatformIO
- Compiling from Arduino IDE
Compiling from PlatformIO
The step-series firmware is developed with PlatformIO, an extension for Visual Studio Code. Each repository of STEP400/800 has a dedicated directory for a platformIO. You can open this folder from "Open Project" menu of PlatformIO. All dependencies are installed automatically when you compile the project first time.
Compiling from ArduinoIDE
If you want to compile the project with the original Arduino IDE from Arduino.cc, following setups are necessary.
- Install Arduino Zero board profile
- Install dependent libraries
- Download sketch
From here, we will go through this steps.
Installing Arduino Zero profile
The step-series is compatible with Arduino Zero. Install "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" from the Arduino IDE's Board Manager. You can refer to the following page for this procedure.
Libraries to install
Install the following libraries from the library manager in the Arduino IDE. You can find a detailed guide to install library here.
- OSC Library
- Adafruit SleepyDog Arduino Library
- STEP400 only : Ponoor PowerSTEP01 Library
- STEP800 only : Ponoor L6470 Library
Note for the OSC library
There are many libraries to support OSC, but for this project, use the OSC Library from CNMAT. From the Arduino IDE, goto "Manage Libraries" and install the library named "OSC". Note that the creators are listed as Adrian Freed and Yotam Mann, not as the organization name CNMAT.
Compiling the sketch
Clone files from the repository of the corresponding model.
|Model||Arduino Sketch Directory||PlatformIO Directory|
If you are not familiar with git system, you can also download ZIP files from upper right
Browse the Arduino sketch folder and open the
.ino file from Arduino IDE. From "Tools" -> "Boards" select "Arduino Zero (Native USB port)" and compile the sketch.
Notes for uploading the Arduino sketch
- If the electromagnet brake board is connected with STEP400, remove it before uploading the sketch. The EM brake on ch.4 is released on uploading the firmware. It may cause the load to drop. This is due to teh setting of the Arduino Zero's bootloader. In STEP800, this problem won't happen so you can leave it connected.
- If you connect only the USB cable to the board, you can upload the sketch, but the motor driver chips won't boot up. So you can't perform any operations that involve exchanging messages with the drivers.
- It seems to be a quirk of the Arduino Zero that it sometimes fails to write. In that case, try double-clicking the RESET switch and putting it in bootloader mode, and try again. In the bootloader mode, the sketch won't boot and L will fade slowly. Also, you have to re-select a different serial port than normal one.