Source, Libraries and Settings

At this point you should be able to upload code (such as the “Blink” sketch) to the board, the basics are confirmed working. If not, work though the prior two pages.

Source Code

Source code for this project is found in the Adafruit_Learning_System_Guides repository on Github, specifically in the M4_Eyes subdirectory. Here’s a direct download link:


The following libraries are used by the eye code. These can be installed through the Arduino Library Manager (SketchInclude LibraryManage Libraries…)

  • Adafruit_GFX
  • Adafruit_ST7789
  • Adafruit_ZeroDMA
  • Adafruit_ImageReader
  • Adafruit_SPIFlash
  • Adafruit_TinyUSB
  • SdFat - Adafruit fork (not the standard SdFat fork)
  • ArduinoJson (not Arduino_JSON)

Project Settings

  • Tools→CPU Speed→180 MHz (overclock) (200 MHz is a bit too much for some boards and may lock up, but you can give it a try. We use 180 MHz for our prepackaged .UF2 files since it’s likely to work on more boards in the wild.)
  • Tools→Optimize→Fastest (-Ofast) (don’t use the “dragon” setting for this, it can cause problems)
  • Tools→USB Stack→TinyUSB (the code will not compile without this selected!)
This guide was first published on Aug 20, 2019. It was last updated on Aug 20, 2019. This page (Source, Libraries and Settings) was last updated on Oct 21, 2019.