HOW to Display Messages on OLED Module with Microbit
Overview
In the previous lesson, the 1602 LCD can only display numbers and characters rather than patterns and Chinese. And the displayed characters can only be up to 32 characters. Here, we have particularly added an OLED liquid crystal module, which can perfectly solve these problems.
The OLED crystal module also uses I2C communication, and the connection diagram is similar to the 1602 LCD. DA interface is P20, and SCL interface is P19. In this experiment, we link the OLED crystal module to the I2C communication interface on the expansion board. Upload the corresponding program, and after power on, the corresponding characters and patterns are displayed on the OLED screen.
Components Needed
-
micro: bit main board * 1
-
Keyestudio Micro bit sensor V2 expansion board * 1
-
USB cable * 1
-
OLED * 1
-
DuPont jumper wire*3
-
Premium Battery Holder 6-cell AA*1
-
1.5V AA Battery*6
Connection Diagram
Test Code
Set test code with library file
Add library file in the following block
Search “OLED”,as shown below, choose the first pattern, then automatically download and install library file.
After installing successfully, the corresponding block will be shown in the edit code column.
Test Results
Wire up according to connection diagram. plug in external power and upload code to micro:bit,the corresponding character and patterns are displayed on OLED.