Skip to content

UniversalUnknown/Bitmap_Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Bitmap_Examples

A predefined repository of bitmap examples for a 128x64 pixel display using the ESP8266 with the SSD1306 module.



Make use of this link for your code base or copy this

#include <SPI.h>
#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 SSD1306 display connected using I2C
#define OLED_RESET -1  // Reset pin
#define SCREEN_ADDRESS 0x3C
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

...
//bitmap code here
...

const int epd_bitmap_allArray_LEN = 1;
const unsigned char* epd_bitmap_allArray[1] = {
	<<module name here>>
};


void setup() {
  Serial.begin(9600);

  // initialize the OLED object
  if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;)
      ;
  }

  // Clear the buffer.
  display.clearDisplay();
  display.drawBitmap(32, 0, <<module name here>> , 64, 64, WHITE);
  display.display();

  // Invert Display
  //display.invertDisplay(1);
}

void loop() {
}

here module name can be find from copy from directed folder.


Example: image2.ino

const unsigned char epd_bitmap_image2 [] PROGMEM = {
	0xff, 0xff, 0xff,
.....
.....
}

epd_bitmap_image2 is the module name so copy it and append it in <<module name here>> , one right below bitmap code(that .ino file you copied) and another on second line of Clear the buffer comment.


Images and links :)

k

image1 source: r/pixelart

copy from


image2

image2 source: Deviantart

copy from


image3

image3 source: r/pixelart

copy from


  • A awesome skeleton gif repository, you can make use of this file for learning.

About

Ready-made bitmap examples on SSD1306 module for 128x64 pixels

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published