#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
// Bitmap Image
const unsigned char Arduino_logo [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0x00, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x00, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xfe, 0x00, 0x3f, 0xff,
0xff, 0xff, 0xff, 0xc0, 0x00, 0xe7, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x70, 0xe3, 0xe0,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3c, 0xe3, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f,
0xef, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x07, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff,
0xc0, 0x01, 0xf8, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xfc, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xc0, 0x0f, 0xff, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3c, 0xe7, 0xc0, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xc0, 0x70, 0xe1, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xe7,
0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xef, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0,
0x00, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0xff,
0xff, 0xf0, 0x00, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x80, 0x03, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x01, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
void setup()
{
Serial.begin(115200);
// initialize with the I2C addr 0x3C
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
delay(2000); // Pause for 2 seconds
// Clear the buffer.
display.clearDisplay();
// Display bitmap image
display.drawBitmap(0, 0, Arduino_logo, 128, 32, WHITE);
display.display();
}
void loop() {
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
oled1:GND
oled1:VCC
oled1:SCL
oled1:SDA