Skip to content

Arduino Programming Guide

Dr. Chet Udell edited this page Oct 20, 2020 · 10 revisions

Program Optron Mini

Install Arduino IDE and configure to program M4 Itsy Bitsy:

Follow instructions at this link: https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4/setup

Then follow the instructions at this link: https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4/using-with-arduino-ide

You will now be able to push code from your computer IDE to the Adafruit M4 ItsyBitsy!

Download Optron Mini Code

Click the green CODE download button on the top-right of the Optron Mini repo page.

https://github.com/udellc/OptronMini/

Unzip the folder

Installing Dependencies:

Find the following folder: OptronMini > Code > dependencies

Drag-Drop or copy the two folders inside (Adafruit_DotStar-master and AsyncDelay) Into the following folder on your computer: (Users) / Documents / Arduino / libraries / (folders go here)

Optron Mini Arduino code:

Find and open the following file with the Arduino IDE Application:

OptronMini > Code > M4_OptronMinixx.xx.xx > M4_OptronMinixx.xx.xx.ino (x's indicate the version number of the code and will change often). The opened window should look like:

-screenshot here-

There are three tabs that organize the code into major sections.

  • M4_....ino: Main program code that uses all support functions and files.
  • LEDPatterns.ino: All Serial LED commands and LED pattern functions are found here
  • Sensors.ino: All Sensor code is found here

Compile and upload

First - connect a USB data cable (some USB cables are only intended for charging and will not work) from the M4 Itsy Bitsy micro USB port to the computer USB port.

If you haven't already done so in the Arduino IDE go to: Tools > Board > Adafruit ItsyBitsy M4 (SAMD51)

Note, there are many different flavors of ItsyBitsy board profiles to choose from, be sure you select Adafruit ItsyBitsy M4 (SAMD51)

Then go to: Tools > Port

Choose the USB COM# port (PC) or dev/cu.usbmodemxxxx (Mac) that corresponds with the Adafruit board

-screenshot here-

Click the Check circle button at the top left of the IDE window to compile. Wait for message on the console to indicate successful compilation.

Click the Arrow button beside the Check button to upload the code to the M4. See troubleshooting guide if there are complications at this stage.