Display hats
There are a number of Raspberry Pi HAT displays available.
Color 1.44 128x128 display (ST7735S)
This HAT is listed as Waveshare 1.44inch LCD Display HAT for Raspberry Pi 128x128 with Embedded Controller Communicating via SPI Interface (Amazon, Waveshare).
- LCD display HAT for Raspberry Pi, 1.44inch diagonal, 128x128 pixels, with embedded controller, communicating via SPI interface.
- 1x joystick (5-position), 3x pushbuttons
- RGB, 65K color
- ST7735S ("green tab")
- Manual
To use this display, use the Adafruit_ST7735_RK
library. The Adafruit_ST7735_RK github contains a README and example code. The pi-HAT example works with this board.
The initialization code is typically:
#define TFT_CS A6
#define TFT_RST A5
#define TFT_DC D22
Adafruit_ST7735 tft = Adafruit_ST7735(&SPI, TFT_CS, TFT_DC, TFT_RST);
This sample uses the display and also handles debouncing the buttons.
As of Device OS 5.9.0, it's not possible to read IOEX_PB7
from user firmware, so you won't be able to interpret the joystick right button.
SSD1305 Monochrome OLED
This HAT is listed as 2.23 inch OLED Display HAT for Raspberry Pi 2B/3B/4B/Zero/Zero W Jetson Nano 128×32 Pixels SPI/I2C Interface (Amazon, Waveshare).
To use this display with the Muon, use the Particle port of the Adafruit SSD1305 library. It's in the community libraries
as Adafruit_SSD1305_RK
and the Adafruit_SSD1305_RK Github contains
the source and README. The example pi-hat
works with this display.
The important parameters for this display are:
#define OLED_CS A6
#define OLED_DC D25
#define OLED_RESET D22
Adafruit_SSD1305 display(128, 32, &SPI, OLED_DC, OLED_RESET, OLED_CS, 7000000UL);