Skip to content

Java toolkit for the Adafruit 128x64 OLED bonnet, with support for the screen, D-pad/buttons, UI layout, and task scheduling

License

Notifications You must be signed in to change notification settings

lukehutch/Adafruit-OLED-Bonnet-Toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adafruit OLED Bonnet Toolkit

Java driver toolkit for the Adafruit 128x64 OLED bonnet for Raspberry Pi, with buttons and D-pad.
(This code is not associated with or endorsed by Adafruit. Adafruit is a trademark of Limor "Ladyada" Fried.)

Raspberry Pi hardware assembly
Hardware assembly: The OLED bonnet mounted on a Raspberry Pi Zero,
which is further mounted on an (optional) Zero4U USB hub.

USB copier screenshot, English   USB copier screenshot, Korean
The USB copier demo application, showing highlighted menus arranged using the built-in
UI layout system, and limited support for internationalization (Latin1 and Korean fonts included).

This toolkit has support for drawing text or pixels on the OLED screen of the bonnet, through the OLED screen's SSD1306 chipset, and for receiving events from the D-pad and buttons through the GPIO interface. It also includes a UI layout library, and some task scheduling classes to make it easy to build an asynchronous application that does not block the screen update thread.

The code is currently designed only for a text UI, although you can write individual pixels to the display, so you could use a Java rendering library to create a BufferedImage, and copy the image over to the display a pixel at a time.

Raspberry Pi config

Make sure your /boot/config.txt file contains the following two lines (to enable I2C, and increase the baudrate to 1Mbaud, to dramatically increase the display update rate).

dtparam=i2c_arm=on
dtparam=i2c_baudrate=1000000

Simple example

See a simple demo application here.

More complex example

For a complete working example of an asynchronous UI application powered by this toolkit, see the usb-copier project.

Code used in this project:

About

Java toolkit for the Adafruit 128x64 OLED bonnet, with support for the screen, D-pad/buttons, UI layout, and task scheduling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published