The Adafruit 128x64 OLED FeatherWing is a crisp and clear OLED display module with a resolution of 128x64 pixels. It is specifically designed to seamlessly integrate with the Adafruit Feather line of development boards, providing a compact and energy-efficient display option for your projects. This display is ideal for adding a small screen to display data, graphics, and text. Common applications include wearable tech, portable instruments, and any project where a small yet readable display is required.
Pin Name | Description |
---|---|
GND | Ground pin, connected to system ground |
3V | 3.3V power supply pin |
SCL | Serial Clock for I2C communication |
SDA | Serial Data for I2C communication |
RST | Reset pin, active low |
To use the Adafruit 128x64 OLED FeatherWing with a Feather board:
#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 (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);
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, WHITE);
// Display the drawing
display.display();
}
void loop() {
// You can add your own code here to update the display repeatedly
}
Ensure that the Adafruit GFX and SSD1306 libraries are installed in your Arduino IDE before uploading this code to your Arduino UNO. The code initializes the display and draws a single pixel.
display.display()
function to refresh the screen after drawing or clearing the display.Q: Can I use this display with other microcontrollers besides the Feather boards?
A: Yes, the display can be used with any microcontroller that supports I2C communication, but you may need to adjust the voltage levels and pin connections accordingly.
Q: How do I install the required libraries for the OLED display?
A: You can install the Adafruit GFX and SSD1306 libraries through the Arduino IDE's Library Manager or by downloading them from the Adafruit GitHub repository.
Q: Is it possible to display images on the OLED FeatherWing?
A: Yes, the Adafruit GFX library provides functions to display bitmap images on the screen. You will need to convert your images to the appropriate format and include them in your code.