The Mono 0.96in 128x64 OLED with STEMMA QT is a compact display module featuring a high-contrast, monochrome OLED screen. With a resolution of 128x64 pixels, this display is capable of presenting text, graphics, and animations with clarity. The inclusion of the STEMMA QT connector simplifies interfacing with microcontrollers, such as the Arduino UNO, allowing for quick and easy prototyping. Common applications include wearable devices, user interfaces, and any project where visual output is required in a small form factor.
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | VCC | Power supply (3.3V - 5V) |
3 | SCL | I2C clock line |
4 | SDA | I2C data line |
5 | RST | Reset pin (optional, can be left floating) |
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SCL, SDA pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
// Initialize with the I2C addr 0x3C (for the 128x64)
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
// Clear the buffer
display.clearDisplay();
// Draw a single pixel in white
display.drawPixel(10, 10, SSD1306_WHITE);
// Display the drawing
display.display();
}
void loop() {
// Nothing here for this simple example
}
Q: Can I use this display with a 5V microcontroller? A: Yes, but ensure that the I2C lines are level-shifted to be compatible with the display's logic level.
Q: How can I change the I2C address? A: The I2C address can be changed by altering the address jumpers on the back of the display module. Refer to the module's datasheet for details.
Q: What library should I use for this display? A: The Adafruit_SSD1306 library is recommended for use with this display and can be installed via the Arduino Library Manager.