/*********************************************************************
This is an example for Adafuit's Monochrome OLEDs based on SSD1306 drivers
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/category/63_98
This example is for a 128x64 size display using I2C to communicate
3 pins are required to interface (2 I2C and one reset)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "bitmap.h" // moved bitmap data to its own file
#define OLED_RESET -1 // share Arduino reset
#define OLED_WIDTH 128
#define OLED_HEIGHT 64
Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT, &Wire, OLED_RESET);
void setup() {
//Serial.begin(115200);
// Wokwi uses address 0x3C, you may need to use address 0x3D
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
// show Adafruit splash screen
display.display();
delay(1000);
display.clearDisplay(); // Make sure the display is cleared
// Draw the bitmap:
// drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color)
display.drawBitmap(0, 0, mickey, 128, 64, WHITE);
// Update the display
display.display();
}
void loop() {
}