0.95 INCH OLED Display Features
OLED displays are high contrast and high-resolution displays, so they provide a good readability for users. There is no backlight on OLED, and it uses independent-illuminated pixels. So it is thinner, and more elegant in compare to LCDs.
This 0.95-inch colorful OLED is graphic type, the resolution is 96×64 pixels and the chip driver is SSD1331.
You can download the datasheet of this module here.
0.95 INCH OLED Display Datasheet
0.95 INCH OLED Display Pinout
This module has 7 pins:
- VCC: Module power supply – 5 V
- GND: Ground
- SCL: I2C clock
- SDA: I2C data
- CS: Module Select
- D/C: Data/ Command
- RES: Reset
You can see the pinout of this module in the image below.
Required Materials
Hardware Components
Software Apps
Interfacing 0.95 INCH OLED Display with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to this module. Connect wires accordingly.
Step 2: Library
Install the following Library on your Arduino.
https://github.com/adafruit/Adafruit-SSD1331-OLED-Driver-Library-for-Arduino
Tip
If you need more help with installing a library on Arduino, read this tutorial: How to Install an Arduino Library
Step 3: Code
Upload the following code to your Arduino.
/*****************************************************************************
*
* File : ssd1331.c
* Hardware Environment: Arduino UNO
* Build Environment : Arduino
* Version : V1.0.7
* Author : Yehui
*
* (c) Copyright 2005-2017, WaveShare
* http://www.waveshare.com
* http://www.waveshare.net
* All Rights Reserved
*
******************************************************************************/
#include <SPI.h>
#include <Wire.h>
#include "ssd1331.h"
#define WIDTH 96
#define HEIGHT 64
#define PAGES 8
#define OLED_RST 9
#define OLED_DC 8
#define OLED_CS 10
#define SPI_MOSI 11 /* connect to the DIN pin of OLED */
#define SPI_SCK 13 /* connect to the CLK pin of OLED */
uint8_t oled_buf[WIDTH * HEIGHT / 8];
void setup() {
Serial.begin(115200);
Serial.print("OLED Example\n");
SSD1331_begin();
SSD1331_clear();
/* display an image of bitmap matrix */
SSD1331_mono_bitmap(0, 0, waveshare_logo, 96, 64, BLUE);
delay(2000);
SSD1331_clear();
/* display rotate */
//SSD1331_Rotate(Rotate_180);
/* display images of bitmap matrix */
SSD1331_mono_bitmap(0, 2, Signal816, 16, 8, GOLDEN);
SSD1331_mono_bitmap(19, 2, Msg816, 16, 8, GOLDEN);
SSD1331_mono_bitmap(38, 2, Bluetooth88, 8, 8, GOLDEN);
SSD1331_mono_bitmap(52, 2, GPRS88, 8, 8, GOLDEN);
SSD1331_mono_bitmap(66, 2, Alarm88, 8, 8, GOLDEN);
SSD1331_mono_bitmap(80, 2, Bat816, 16, 8, GOLDEN);
/* display strings */
SSD1331_string(0, 52, "MUSIC", 12, 0, WHITE);
SSD1331_num(32, 52, (double)20.62,2, 12, 1, RED);
SSD1331_string(64, 52, "MENU", 12, 1, WHITE);
/* display strings 32x16 */
SSD1331_char3216(0,16, '1', BLUE);
SSD1331_char3216(16,16, '2', BLUE);
SSD1331_char3216(40,16, ':', RED);
SSD1331_char3216(64,16, '3', GREEN);
SSD1331_char3216(80,16, '4', GREEN);
}
void loop() {
This code is for testing the display and shows various shapes and designs graphically.
Comments (2)
Is it possible to have a step by step on using this oled device within a seperate project. Sorry I am an old man newbie.
Thanks
Hi dear.
that is my honer to help you.
which part is difficult to do?
let me know what do you want to do with this OLED?