Adafruit will not be shipping orders Monday July 4, 2016 in observance of Independence Day. Any orders placed after 11am EST Friday July 1 will go out Tuesday July 5.

Overview

This project was inspired by a forum member who asked a simple question: Can you interface a Trinket mini microcontroller to the Adafruit RGB LCD Shield. The shield is made to interface with more "classic" Arduino microcontrollers with an Arduino standard shield pin layout. Obviously the shield cannot stack onto Trinket but with four wires, the display shield can hook up to a Trinket project well. This is accomplished as both use the I2C or two-wire bus to communicate. As a further demonstration, the Adafruit I2C based DS1307 real-time clock module is used to display the time and date. The display shield's buttons allow for changing the hour in case of daylight savings time and toggle the backlight.
Update 2016: Adafruit has updated their libraries to allow the Trinket's ATtiny85 to use the same libraries as the Arduino Uno and other boards. This tutorial updates the libraries and code to reflect this.

Libraries

The project uses three code libraries:

  • Wire.h - the Arduino standard library for I2C/two wire communication (already installed with the Arduino IDE)
  • RTClib - Used to communicate with the DS1307 real-time clock
  • Adafruit_RGBLCDShield - communicates with the Adafruit RGB LCD Shield

You may click on the links to download from the Adafruit Github repository.

These should be installed in your Arduino folder where your sketches are stored in the libraries folder. For an in-depth discussion of installing and managing Arduino libraries, see tutorial All About Arduino Libraries.

Getting Ready

If you use the Arduino IDE version 1.6.5 or later, you can download the Adafruit board file in the Tools -> Board -> Board Manager.  You will then be able to select "Trinket 8 MHz" as a board and all is well.

If you use an older Arduino IDE, you must follow the instructions in the Introducing Trinket tutorial to set up your Arduino development environment properly. Failure to do all the steps will not allow you to program a Trinket properly.
Last updated on 2016-02-03 at 02.12.45 PM Published on 2014-01-27 at 11.05.43 AM