Product Introduction #
OLED belongs to a current type of organic light emitting device, also known as organic laser display, organic light emitting semiconductor. Under the action of electric field, the internal electrons of OLED will move and meet, and the energy excitons generated will excite luminescence, thereby producing visible light.
Widely used in TV, commercial display, conference display, car display, etc.
Parameter Specification #
Parameters | Value/Description |
Operating voltage | 3.3~5V |
Operating temperature | -30°C~+70°C |
Resolution | 128*64 |
Angle of view | >160° |
Driver chip | SSD1306 |
Control signal | IIC |
Size | 4.72cm*2.38cm |
Wiring Diagram #
Note:Expansion board is attached to esp32 controller board.
OLED Module | ESP32 |
VCC | 5V |
GND | GND |
SCL | SCL |
SDA | SDA |
Sample Code #
#include //Import the OLED graphics display library
#include //Import Arduino's IIC library
//Define 0.96 inch OLED12864 display
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
//Defines the page content function for the OLED display
void page1() {
u8g2.setFont(u8g2_font_timR14_tf);//Sets the font to display
u8g2.setFontPosTop();//Set font position to be aligned close to the top
u8g2.setCursor(20,20);//Set font display coordinates
u8g2.print("ACEBOTT");//Setting display content
}
void setup(){
u8g2.begin();//Initializing the display
u8g2.enableUTF8Print();//Enable UTF8 printing
}
void loop(){
u8g2.firstPage();
do //The U8g2 library's common way of writing loops is to use the do{}while() form
{
page1();//Calling a function
}while(u8g2.nextPage());
}
Note: If you are using an Arduino board, then connect the SCL pin of the OLED to the PIN A5 of the Arduino and the SDA pin to the PIN A4 of the Arduino, and upload the program.
Test Results #
After uploading the code to the controller board, the text “ACEBOTT” will be displayed in the middle of the OLED display, and the text can be displayed in different positions of the screen by changing the coordinates of the text display.
Related Resources #
Get One Now #
B2B Business: info@acebott.com