In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The main content of this article is to explain "what is the method of Python driving OLED LCD screen". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the method of Python driving OLED LCD screen"?
Required components
F407 Micropython development board
A data line
Some DuPont lines
OLED LCD screen
1. What is an OLED display
Brief introduction of 1.OLED display screen
Organic light-emitting diodes (organic light-emitting diode,OLED) is a patented display technology developed by Kodak that uses organic polymer materials as semiconductor (semiconductor) materials in light-emitting diodes. Polymeric materials can be natural or synthetic, large or small. It is widely used in mobile phones, digital cameras, DVD players, personal digital assistants (PDA), notebook computers, car audio and television. The OLED monitor is thin and light because it does not use backlight.
In this example, a 0.96-inch OLED display screen is used, which has high brightness, low power consumption, pure color and good visual effect in the sun. The power supply of the module can be 3.3V or 5V, there is no need to modify the module circuit, and it is compatible with three communication modes: 4-wire SPI, 3-wire SPI and IIC. The communication mode can be skipped according to the BOM table provided. The module has a total of three colors: blue, white, yellow and blue. The OLED screen has multiple control instructions, which can control the brightness, contrast, switch boost circuit and other instructions of the OLED. Easy to operate and rich in functions. At the same time, in order to facilitate the application in the product, four M2 fixed holes are reserved for the user to fix on the housing. The driver chip of the 0.96-inch OLED display is: SSD1306 (which has been integrated in the screen).
two。 Actual display effect
3.OLED interface definition
1 > GND= power source
2 > VCC= Power Source (2.8V~5.5V)
3 > DO = clock line
4 > DI = data cable
5 > RES= reset line
6 > DC = data / command
7 > CS = piece selection
1. Wiring method of hardware
In this OLED, the SPI interface is needed to connect with the F407 Micropython development board to transmit data. The SPI interface is the synchronous serial data transmission between the CPU and the peripheral low-speed devices. The F407 Micropython development board has two SPI interfaces. In this experiment, we use the SPI1 interface of the F407 Micropython development board.
two。 Specific wiring method
6. Physical wiring diagram
After wiring the ok, and importing the font_.py file and ssd1306.py file, you can run main.py again.
4. Program source code
Import pybfrom ssd1306 import SSD1306display = SSD1306 (pinout= {'dc':' X36, 'res':' X35'}, height=64, external_vcc=False) led_red = pyb.LED (1) led_red.off () display.poweron () display.init_display () display.draw_text (1) Hello EveryOne',size=1,space=1) display.draw_text (1) Micropython F407 Space=1 (display.draw_text) # shows what you want to show. Display.display () so far. I believe you have a deeper understanding of "what is the method of Python driving OLED LCD screen". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.