Skip to content

An open-source emulator for small OLED displays that are often used for Arduino/IOT projects.

Notifications You must be signed in to change notification settings

sam-peach/SSD1306-OLED-Emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSD1306 OLED Emulator

An open-source emulator for small OLED displays that are often used for Arduino/IOT projects.

This project is still in an alpha build so it may be a little unstable.

Table of contents

  1. Who is this for?
  2. How to use
  3. Compiling from source
  4. Coming soon

Who is this for?

Anyone wanting to see how their device would interact with an OLED display without having one on hand!

My inspiration for the project came from working on an IOT project and, halfway through, realizing I didn't have the display I thought I did. This bugged me as I have a computer 100x more powerful than the Arduino I was working with, and a nice monitor - why couldn't I just send and render the data that would have gone to the small OLED display to my computer and render it there instead? ... turns out you can!

So if you don't have an OLED display, or just can't be bothered to find it, this emulator enables you to still run your program and see what the display would render!

How to use

Step 1

Download the executable directly from the builds folder here. Windows is only supported at the moment

Step 2

In your Arduino IDE, download the Adafruit SSD1306 EMULATOR library

image

Step 3

Replace all occurrences of #include <Adafruit_SSD1306> with #include <Adafruit_SSD1306_EMULATOR> in your Arduino IDE file. Make sure to swap out all uses of the Adafruit_SSD1306 type with Adafruit_SSD1306_EMULATOR as well.

//#include <Adafruit_SSD1306.h>
#include <Adafruit_SSD1306_EMULATOR.h>
//Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
Adafruit_SSD1306_EMULATOR display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

Step 4

Set the baud rate in your Arduino IDE to 9600

Step 5

Flash the updated file onto your microcontroller

Step 6

Run the display emulator executable downloaded in step 1 and pick the serial port your Arduino is connected to

image

Step 7 (Optional)

Reset your Arduino to sync the emulator and your device. The emulator will sync up on its own but may take a few frames.

image

Compiling from source

With Rust installed, this is as easy as cloning this repo and running cargo run in the cloned directory.

Coming soon!

As this is still an early alpha build there are a few features that are still in the works:

  • Test coverage: yeah, I know. I'll hand myself over to the TDD police.
  • Scrolling: surprisingly fiddly to implement, but halfway there
  • General stability: there are a few small things that currently crash the emulator, but should be recoverable instead.

About

An open-source emulator for small OLED displays that are often used for Arduino/IOT projects.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages