If this is your first time using Trinket, follow the Adafruit Arduino IDE Setup for guidance; a couple extra steps are required compared to typical Arduino Uno programming — the Introducing Trinket guide may help. Try out the “blink” sketch and confirm you can upload code to the board (on the Trinket board, the LED is on pin 1 instead of 13). If you’re not already running the Arduino IDE version 1.6.4 or later, this is a really good time to upgrade. It greatly simplifies installing libraries and support for alternate boards such as Trinket.
Software for the poi project can be fetched from GitHub:
The “poi” folder contains the Arduino sketch for this project and has two files - poi.ino and graphics.h. Place both these files into your Arduino sketch names poi. T
he “convert” folder is a utility for processing images — we’ll cover that on the next page.
This project also requires the Adafruit DotStar library for Arduino. Use the Library Manager to install this (Sketch→Include Library→Manage Libraries…), or if you’re using an older version of the Arduino IDE, it can be downloaded and installed manually:
There are two files in the “poi” folder, which will open as two tabs in the Arduino sketch. The second file/tab — graphics.h — contains the bitmaps and color palettes for the different modes. We’ll explain how to add different ones on the next page.
The code and example images are filling the Trinket’s program space right up to the brim. Occasionally updates to the Arduino IDE software result in programs that are just a little bigger than they used to be. If that happens, it will be necessary to remove one or more images from graphics.h to free up some space.
Digging through the poi code itself, you might spot references to some additional features. These aren’t used in the poi project because both program memory and physical space in the plastic capsule are at their limits…but in the future, this same code might be used in other projects where space is less of a concern.