Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OLED Logo Example
#include "Adafruit_GFX.h"
#include "Adafruit_SSD1306.h"
Adafruit_SSD1306 display(D0);
static const uint8_t particle[480] = {
0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000,
0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000,
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000,
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00001111, 0B11111111, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B01000000, 0B00100000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000100, 0B00000011, 0B00000000, 0B10000000, 0B00001100, 0B00000011, 0B10000000, 0B00000000, 0B00000000, 0B00000000, 0B11000000, 0B00100000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000011, 0B00000011, 0B00000011, 0B00000000, 0B00001100, 0B00000000, 0B11000000, 0B00000000, 0B00000000, 0B00000000, 0B11000000, 0B00100000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000011, 0B10000111, 0B10000111, 0B00000000, 0B00001100, 0B00000000, 0B01100000, 0B00000000, 0B00000000, 0B00000000, 0B11000000, 0B00000000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000001, 0B11100011, 0B00011110, 0B00000000, 0B00001100, 0B00000000, 0B01100000, 0B00000000, 0B00000000, 0B00000000, 0B11000000, 0B00000000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000000, 0B11110000, 0B00111100, 0B00000000, 0B00001100, 0B00000000, 0B00110000, 0B00000000, 0B00000000, 0B00000000, 0B11000000, 0B00000000, 0B00000000, 0B00000010, 0B00000000, 0B00000000,
0B00000000, 0B11111100, 0B11111100, 0B00000000, 0B00001100, 0B00000000, 0B00110001, 0B11111111, 0B00000100, 0B00011100, 0B11111111, 0B00100000, 0B00111111, 0B10000010, 0B00000111, 0B11110000,
0B00000000, 0B01111111, 0B11111000, 0B00000000, 0B00001100, 0B00000000, 0B00110011, 0B00000011, 0B10000100, 0B01111000, 0B11000000, 0B00100000, 0B11110001, 0B11000010, 0B00001110, 0B00111000,
0B00000000, 0B00111111, 0B11110000, 0B00000000, 0B00001100, 0B00000000, 0B00100000, 0B00000000, 0B11000100, 0B11000000, 0B11000000, 0B00100001, 0B10000000, 0B01100010, 0B00011000, 0B00001100,
0B00000001, 0B00111111, 0B11110010, 0B00000000, 0B00001100, 0B00000000, 0B01100000, 0B00000000, 0B11000101, 0B10000000, 0B11000000, 0B00100011, 0B00000000, 0B00100010, 0B00110000, 0B00000110,
0B00111111, 0B10011111, 0B11100111, 0B11110000, 0B00001100, 0B00000000, 0B11000000, 0B00000000, 0B01000111, 0B00000000, 0B11000000, 0B00100011, 0B00000000, 0B00000010, 0B00100000, 0B00000010,
0B00111111, 0B10011111, 0B11100111, 0B11110000, 0B00001100, 0B00000001, 0B11000000, 0B00000000, 0B01100110, 0B00000000, 0B11000000, 0B00100110, 0B00000000, 0B00000010, 0B01100000, 0B00000011,
0B00000001, 0B00111111, 0B11110010, 0B00000000, 0B00001111, 0B11111111, 0B00000000, 0B11111111, 0B01100110, 0B00000000, 0B11000000, 0B00100110, 0B00000000, 0B00000010, 0B01100000, 0B00000011,
0B00000000, 0B00111111, 0B11110000, 0B00000000, 0B00001111, 0B11111100, 0B00000011, 0B11111111, 0B11100100, 0B00000000, 0B11000000, 0B00100110, 0B00000000, 0B00000010, 0B01100000, 0B00000011,
0B00000000, 0B01111111, 0B11111000, 0B00000000, 0B00001100, 0B00000000, 0B00000111, 0B00000000, 0B01100100, 0B00000000, 0B11000000, 0B00100110, 0B00000000, 0B00000010, 0B01111111, 0B11111111,
0B00000000, 0B11111100, 0B11111100, 0B00000000, 0B00001100, 0B00000000, 0B00000100, 0B00000000, 0B01100100, 0B00000000, 0B11000000, 0B00100110, 0B00000000, 0B00000010, 0B01100000, 0B00000000,
0B00000000, 0B11110000, 0B00111100, 0B00000000, 0B00001100, 0B00000000, 0B00001100, 0B00000000, 0B01100100, 0B00000000, 0B11000000, 0B00100110, 0B00000000, 0B00000010, 0B01100000, 0B00000000,
0B00000001, 0B11100011, 0B00011110, 0B00000000, 0B00001100, 0B00000000, 0B00001100, 0B00000000, 0B01100100, 0B00000000, 0B11000000, 0B00100010, 0B00000000, 0B00000010, 0B01100000, 0B00000000,
0B00000011, 0B10000111, 0B10000111, 0B00000000, 0B00001100, 0B00000000, 0B00001100, 0B00000000, 0B11100100, 0B00000000, 0B11000000, 0B00100011, 0B00000000, 0B00000010, 0B00110000, 0B00000000,
0B00000011, 0B00000011, 0B00000011, 0B00000000, 0B00001100, 0B00000000, 0B00000110, 0B00000000, 0B11100100, 0B00000000, 0B01000000, 0B00100001, 0B10000000, 0B00110010, 0B00110000, 0B00000010,
0B00000100, 0B00000011, 0B00000000, 0B10000000, 0B00001100, 0B00000000, 0B00000111, 0B00000011, 0B01100100, 0B00000000, 0B01100000, 0B00100000, 0B11000000, 0B01100010, 0B00011100, 0B00001110,
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00001100, 0B00000000, 0B00000011, 0B11111110, 0B01100100, 0B00000000, 0B00111111, 0B00100000, 0B01111111, 0B11000010, 0B00001111, 0B11111100,
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B11111000, 0B00000100, 0B00000000, 0B00011110, 0B00100000, 0B00011111, 0B00000010, 0B00000011, 0B11100000,
0B00000000, 0B00000001, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000,
0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000,
0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000,
};
void setup() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println("Powered by");
display.drawBitmap(0, 25, particle, 128, 30, WHITE);
display.display();
delay(2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.