View Raw Markdown
rev:538 · 2015-07-14T02:59:27+00:00
0.96 OLED(English)
Description
This RPI 0.96'OLED display has 128*64 individual blue OLED pixels,each one is turned on or off by the controller chip.the display scale is 23.7*12.8(mm),and it's so tiny and delicate.Due to OLED pixel's special brightness,the display makes its own light ,no backlight is required ,and that make this display fantastic and low power cost 
Technical Details
| Type | Value |
|---|---|
| align="center" scope="row"4 | Name | RPI_0.96'OLED_Display module |
| resolution ratio | 128×64 |
| screen type | 0.96'OLED |
| control chip | SSD1306 |
| module scale | 36.5x29.7x11.9(mm) |
| Pixel Pitch | 0.17×0.17 |
| Pixel Size | 0.15×0.15 |
| work voltage | 5V |
Overview
安装于树莓派端
夜晚下的表现
OLED Module Scale
Schematic
Learn
- If it's the first time for you to use this module, please make sure the SPI interface is enabled. The following will show you how to enable the SPI interface.
type sudo raspi-config

- In this page select number 8 colum [Advanced options] ,and then select [SPI] column and yes to enable SPI Interface,and the Raspberry Pi will restart
- Download OLED's ssd1306 driver,If you are done download the device driver,extract them copy and past to /home/Pi folder
- Type
sudo apt-get install build-essential git-core libi2c-dev i2c-tools lm-sensorsto install necessary component
- If you are done install these softwares,type
cd 1306-0.96-CODEand get into the driver folder,then typesudo maketo compile the code
cd examplesand typemake,compile the demo code
- After the compiling examples code is done you will find a executable file, type
sudo./ssd1306_demoand the OLED display is on work
demo code
#include "OLEDType_SSD1306.h" //include driver file
#include "OLED_GFX.h"
#include "OLED_SSD1306.h"
OLED_SSD1306 display; //instantiate OLED_SSD1306 Object
const unsigned char rpi_2[128] = { /* 0X00,0X01,0X1A,0X00,0X20,0X00, */ //the binary file of picture
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X07,0XC1,0XF0,0X00,0X18,0X32,0X06,0X00,
0X10,0X0C,0X02,0X00,0X11,0X0C,0X02,0X00,0X10,0X4C,0X84,0X00,0X08,0X2D,0X04,0X00,
0X0C,0X1E,0X08,0X00,0X06,0X3F,0X10,0X00,0X03,0XE1,0XF0,0X00,0X04,0X40,0X18,0X00,
0X08,0XC0,0X88,0X00,0X09,0XFF,0XE4,0X00,0X0F,0X1C,0X34,0X00,0X1E,0X0C,0X1E,0X00,
0X24,0X0C,0X12,0X00,0X24,0X0C,0X01,0X00,0X24,0X0C,0X11,0X00,0X26,0X1E,0X19,0X00
0X2F,0XE1,0XFB,0X00,0X1B,0XC0,0XE6,0X00,0X10,0XC0,0XC6,0X00,0X10,0XC0,0X84,0X00,
0X08,0X40,0X84,0X00,0X08,0X73,0X0C,0X00,0X06,0X7F,0X98,0X00,0X01,0XC0,0XE0,0X00,
0X00,0XC0,0XC0,0X00,0X00,0X33,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,0X00,0X00,
};
unsigned char rpi_3[128] = { /* 0X00,0X01,0X1A,0X00,0X20,0X00, */ //the binary file of picture
0XFF,0XFF,0XFF,0XC0,0XFF,0XFF,0XFF,0XC0,0XF8,0X3E,0X0F,0XC0,0XE7,0XCD,0XF9,0XC0,
0XEF,0XFB,0XFD,0XC0,0XEE,0XF3,0XFD,0XC0,0XEF,0XB3,0X7B,0XC0,0XF7,0XD2,0XFB,0XC0,
0XFF,0XE1,0XFF,0XC0,0XFD,0XC0,0XEF,0XC0,0XFC,0X1E,0X0F,0XC0,0XFB,0XBF,0XE7,0XC0,
0XF7,0X3F,0X77,0XC0,0XF6,0X00,0X1B,0XC0,0XF0,0XE3,0XCB,0XC0,0XE1,0XF3,0XE1,0XC0,
0XDB,0XF7,0XFD,0XC0,0XDB,0XF3,0XFE,0XC0,0XDB,0XF3,0XEE,0XC0,0XD9,0XE1,0XE6,0XC0,
0XD0,0X1E,0X04,0XC0,0XE4,0X3F,0X19,0XC0,0XEF,0X3F,0X39,0XC0,0XFF,0XBF,0X7B,0XC0,
0XF7,0XBF,0X7B,0XC0,0XF7,0X8C,0XF3,0XC0,0XF9,0X80,0X67,0XC0,0XFE,0X3F,0X1F,0XC0,
0XFF,0X3F,0X3F,0XC0,0XFF,0XDC,0XFF,0XC0,0XFF,0XF3,0XFF,0XC0,0XFF,0XFF,0XFF,0XC0,
};
int main(int argc, char **argv)
{
if ( !display.init(OLED_SPI_DC,OLED_SPI_RESET,OLED_SPI_CS0,OLED_OLED_SPI_128x64) ) //initiate the OLED display
exit(EXIT_FAILURE);
display.begin(); //start to display
display.clearDisplay(); //clear screen
display.drawBitmap(0,20,rpi_3,32,32,1); //set the original location X:0,Y:20,picture :RPI_3,length :32,width:32,color black
display.drawBitmap(32,20,rpi_2,32,32,1); //set the original location X:32,Y:20,picture :RPI_2,length :32,width:32,color black
display.drawBitmap(64,20,rpi_3,32,32,1); //set the original location X:64,Y:20,picture :RPI_3,length :32,width:32,color black
display.drawBitmap(96,20,rpi_2,32,32,1); //set the original location X:96,Y:20,picture :RPI_2,length :32,width:32,color black
display.setTextSize(1); //set Text size 1
display.setTextColor(WHITE); //set Text color white
display.setCursor(29,0); //set Text location X:29,:Y:0
display.print("Hello World"); //set the Text content Hello World
display.setCursor(29,8); //set Text location X:29,:Y:8
display.print("www.52pi.cn"); //set Text content www.52pi.cn
display.display(); //display above picture
usleep(10000); //delay
}
Shop
Attention
1306-0.96-CODE.zip Media:SSD1306-Revision 1.0.pdf 如对此页的规则或教程有意见者,可到此网页或是在管理员Powup333的讨论页留言。