Skip to content

Compiling the Arduino sketch

Kanta HORIO edited this page Sep 20, 2020 · 7 revisions

Select board

STEP400 is compatible with Arduino Zero, so install "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" from the Arduino IDE's Board Maneger. You can refer to the following page for this procedure.

Getting started with the Arduino Zero

Installing library

OSC library

Install the OSC Library from CNMAT. In the Arduino IDE, go to "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.

ArduinoJSON Libarary

ArduinoJSON

You can install this library with a library maneger, as same as above.

Ponoor_PowerSTEP01_Library

Next, install Ponoor_PowerSTEP01_Library. You can't install this from the IDE, so please download the zip file from Github and install it in your Arduino's library folder.

Compiling a sketch

The files in the repository are uploaded together with the Visual Studio plugin (VisualMicro) files, but you can open them directly from the Arduino IDE. The sketch is here; https://github.com/kanta/STEP400_prototype/blob/master/rev4/STEP400_proto_r4_firmware/STEP400_proto_r4_firmware/STEP400_proto_r4_firmware.ino

In the Arduino IDE, select the board "Arduino Zero (Native USB port)" and compile it.

Notes on writing

  • If you connect only USB to the board, you can write sketches, but the motor driver chip won't boot up. So you can't perform any operations that involve exchanging messages with the driver.
  • 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 trying again. In bootloader mode, the sketch won't boot and L will fade slowly. Also, you have to select a different serial port from the normal one.
Clone this wiki locally