Adafruit 1.27" and 1.
Overview We love our black and white monochrome displays but we also like to dabble with some color now and then. Our big 1.5" color OLED displays are perfect when you need a small display with vivid, high-contrast 16-bit color. The visible portion of the OLED measures 1.5" diagonal and contains 128x128 RGB pixels, each one made of red, green and blue OLEDs. Each pixel can be set with 16-bits of resolution for a large range of colors.
Board Technical Details 1.5" diagonal OLED, 16-bit color SPI interface 3.3-5V logic and power Micro-SD card holder Dimensions: 43.17mm / 1.7" x 42mm / 1.65" x 5.42mm / 0.2" © Adafruit Industries https://learn.adafruit.
Assembly The breakout board comes fully assembled and tested. We include an optional strip of header pins to make it easier to use this display in a breadboard. The header can be installed in just a few minutes with your soldering iron: © Adafruit Industries https://learn.adafruit.
Prepare the header strip Cut the header to size and insert (long pins down) into a breadboard to stabilize for soldering. © Adafruit Industries https://learn.adafruit.
Position the display Place the display breakout on the header so that the short pins protrude through the holes. And Solder! Solder all pins to assure a good electrical connection. © Adafruit Industries https://learn.adafruit.
Remove the protective film Gently pull up on the tab to remove the film. © Adafruit Industries https://learn.adafruit.
Wiring and Graphics Test The pinout ordering is the same for both the 1.27" and 1.5" version of the OLED! https://adafru.it/sVa https://adafru.it/sVa The library supports flexible wiring to minimize pin conflicts with other shields and breakouts.
Installing the Arduino software Now we can run the test software on the Arduino. Three libraries need to be installed using the Arduino Library Manager…this is the preferred and modern way. From the Arduino “Sketch” menu, select “Include Library” then “Manage Libraries…” © Adafruit Industries https://learn.adafruit.
Type “gfx” in the search field to quickly find the first library — Adafruit_GFX: Repeat the search and install steps, looking for the Adafruit_ZeroDMA and Adafruit_SSD1351 libraries. After you restart, you should be able to select File→Examples→Adafruit_SSD1351→test - this is the example sketch that just tests the display by drawing text and shapes. Upload the sketch and you should see the following: The test sketch demonstrates all the basic drawing functions of the Adafruit GFX Library.
Drawing Bitmaps Wiring for the Bitmap Example Drawing bitmaps from the on-board micro SD card requires a few more connections to communicate with the SD card. The library allows you to use any pins. The Arduino connections listed below match the code in the "bmp" example from the library: GND -> GND (G) 5v -> VIN (+) #7 -> SDCS (SC) #4 -> DC #6 -> RST (R) #5 -> OLEDCS (OC) #11 -> MOSI (SI) #12 -> MISO (SO) #13 -> SCLK (CL) Note that the Bitmap example code uses hardware SPI wiring for maximum speed.
Hint: If you are confused by the abbreviations on the front of the board, the full signal names are printed on the back! © Adafruit Industries https://learn.adafruit.
Bitmap Example Sketch To display bitmaps from the on-board micro SD slot, you will need a micro SD card (http://adafru.it/102) formatted FAT16 or FAT32 (they almost always are by default). There is a built in microSD card slot on the rear of the breakout and we can use that to load bitmap images! It's really easy to draw bitmaps. We have a library for it, Adafruit_ImageReader_Library, which can be installed through the Arduino Library Manager (Sketch→Include Library→Manage Libraries…).
Insert the card Insert the micro SD card into the slot on the back of the SSD1351 breakout board. Copy the bitmap file Copy the file "lily128.bmp" from the Adafruit_ImageReader_Library\images folder to the root directory of your micro-SD card. © Adafruit Industries https://learn.adafruit.
Load the BreakoutSSD1351 example sketch Select "Examples->Adafruit_ImageReader_Library>BreakoutSSD1351" to load it into your editor. In the example, find the following section of code: // Load full-screen BMP file 'rgbwheel.bmp' at position (0,0) (top left). // Notice the 'reader' object performs this, with 'tft' as an argument. Serial.print(F("Loading rgbwheel.bmp to screen...")); stat = reader.drawBMP("/rgbwheel.bmp", tft, 0, 0); reader.printStatus(stat); // How'd we do? On the line with reader.
rotate images using the setRotation() procedure. The BreakoutSSD1351 example sketch shows everything you need to work with BMP images. Here’s just the vital bits broken out… Several header files are included at the top of the sketch. All of these are required…they let us access the SD card and the display, and provide the image-reading functions: #include #include #include #include #include // Core graphics library
Downloads and Links Data Sheets: SSD1351 Display Controller Datasheet (https://adafru.it/sVb) 1.5" OLED Display Module datasheet (https://adafru.it/cBE) Fritzing objects in the Adafruit Fritzing library (https://adafru.it/aP3) EagleCAD PCB for 1.27" Color OLED (https://adafru.it/rqB) EagleCAD PCB for the 1.5" Color OLED (https://adafru.it/rqC) Schematic Click to enlarge For the level shifter we use the CD74HC4050 (https://adafru.