micropython lcd display made in china
I"m interested in getting Chinese characters to display on an st7789 display but haven"t I figured out how to do it yet. I have no problem printing out text in English. I"m using the following drivers with the Pico [/url]https://github.com/russhughes/st7789py_mpy[url]. I"m assuming either I need to download a font file or need to make my own but I"m not that advanced yet.
Check the number in the table, this is your address. If there are more devices on your I2c bus, there will be several addresses visible. To be sure, unplug all other devices and the address left will be the LCD (or try them all)
HTS221, LPS22, LIS2DW12, LIS2MDL, LSM6DSO, STTS751, si7051, bme280, bmp280, APDS9930, TM1650, TM1637, LCD1602, GNSS, all kinds of micropython drives, examples, libs
This repository contains all of the code for interfacing with a 16x2 Character I2C LCD Display. This accompanies my YouTube tutorial here: https://www.youtube.com/watch?v=fR5XhHYzUK0
A component library providing a Pillow-compatible drawing canvas, and other functionality to support drawing primitives and text-rendering capabilities for small displays on the Raspberry Pi and other single board computers.
Qnap lcd python module, features both writing to the display as wel as reading keypresses from the panel keys. It was developed on a Qnap TS-459 and a TS-453A, it works on some other models as well.
Chinese embedded electronics specialist 01Space has launched an Arduino, MicroPython, and CircuitPython-compatible compact development board powered by a Raspberry Pi RP2040 microcontroller — and a display that"s almost as small as the USB Type-C port that powers it: the RP2040-0.42LCD.
"RP2040-0.42LCD is a high-performance development board [with] integrated 0.42" LCD (70×40 resolution) with flexible digital interfaces," its creators claim of the design, which was brought to our attention byCNX Software. "It incorporates Raspberry Pi"s RP2040 microcontroller chip. The RP2040 features a dual-core Arm Cortex-M0+ processor clocked at 133MHz with 264KB internal SRAM [static RAM] and 2MB [external] flash storage."
The board itself features pins down either side for breadboard compatibility and a USB Type-C port to the top for data and power. Just beneath this is the aforementioned display, an ultra-compact glass panel, which is actually built on organic light-emitting diode (OLED) rather than liquid-crystal display (LCD) technology.
For software compatibility, the 01Space board can be treated as a Raspberry Pi Pico — meaning there"s support in both MicroPython and CircuitPython, or it can be used with the Arduino IDE usingEarle Philhower"s community Arduino core. For the latter, 01Space offers a selection of example programs — including one that loads and displays small animated GIFs on the single-color display.
More details on the RP2040-0.42LCD are availableon the 01Space GitHub repository, while boardscan be purchased from Banggoodfor $11.99 including shipping.
Please take care of the direction when you connect Pico, an USB port is printed to indicate. You can also check the pin of Pico and the LCD board when connecting.
3. Please refer to the official micropython document to set up the environment, and select the Raspberry Pi Pico device in Thonny"s Tools->Options->Interprete. As shown below:
3. To configure the driver file, open the Arduino library file directory, usually in C:\Users\xxxx\Documents\Arduino\libraries\TFT_eSPI\ , for ResTouch-LCD-3.5, put the TFT_eSPI library (User_Setups\Setup60_RP2040_ILI9341.h) (User_Setup_Select.h) ) with the files in the sample program folder Arduino\ResTouch-LCD-3.5, and the same for ResTouch-LCD-2.8, as shown in the figure.
The C demo is for Pico-ResTouch-LCD-2.8 and Pico-ResTouch-LCD-3.5. In the main function, we place the three main functions in order and place TP_DrawBoard(); in an infinite loop to achieve the above function.
Note that if you want to test the LCD_ShowBMP example, you need to copy the picture from the PIC folder to the root directory of a micro SD card, and insert the SD card into the slot in the backside of the LCD. Then run the examples.
The micro SD card should in FAT format, and the resolution of the pictures used should be the same as the LCD, for a 2.8inch LCD, it is 320 × 240, and 480 × 320 for a 3.5inch LCD. 24bit BMP.
The LCD controller is ILI9488, we need to initialize the controller at the first, which is done in LCD_Driver.c file, and being called in lcd_test.c file.
In the example, this demo shows that the BMP picture first reads the picture data in the BMP format on the SD card through the SPI protocol and displays it.
These functions are written in LCD_Bmp.c, actually read the picture data in the BMP format with a specific file name from the SD card and then call the display function written by ourselves to "express" the data as an image again.
We have used Liquid Crystal Displays in the DroneBot Workshop many times before, but the one we are working with today has a bit of a twist – it’s a circle! Perfect for creating electronic gauges and special effects.
LCD, or Liquid Crystal Displays, are great choices for many applications. They aren’t that power-hungry, they are available in monochrome or full-color models, and they are available in all shapes and sizes.
Today we will see how to use this display with both an Arduino and an ESP32. We will also use a pair of them to make some rather spooky animated eyeballs!
Waveshare actually has several round LCD modules, I chose the 1.28-inch model as it was readily available on Amazon. You could probably perform the same experiments using a different module, although you may require a different driver.
There are also some additional connections to the display. One of them, DC, sets the display into either Data or Command mode. Another, BL, is a control for the display’s backlight.
The above illustration shows the connections to the display. The Waveshare display can be used with either 3.3 or 5-volt logic, the power supply voltage should match the logic level (although you CAN use a 5-volt supply with 3.3-volt logic).
Another difference is simply with the labeling on the display. There are two pins, one labeled SDA and the other labeled SCL. At a glance, you would assume that this is an I2C device, but it isn’t, it’s SPI just like the Waveshare device.
This display can be used for the experiments we will be doing with the ESP32, as that is a 3.3-volt logic microcontroller. You would need to use a voltage level converter if you wanted to use one of these with an Arduino Uno.
The Waveshare device comes with a cable for use with the display. Unfortunately, it only has female ends, which would be excellent for a Raspberry Pi (which is also supported) but not too handy for an Arduino Uno. I used short breadboard jumper wires to convert the ends into male ones suitable for the Arduino.
Once you have everything hooked up, you can start coding for the display. There are a few ways to do this, one of them is to grab the sample code thatWaveshare provides on their Wiki.
The Waveshare Wiki does provide some information about the display and a bit of sample code for a few common controllers. It’s a reasonable support page, unfortunately, it is the only support that Waveshare provides(I would have liked to see more examples and a tutorial, but I guess I’m spoiled by Adafruit and Sparkfun LOL).
Open the Arduino folder. Inside you’ll find quite a few folders, one for each display size that Waveshare supports. As I’m using the 1.28-inch model, I selected theLCD_1inch28folder.
Once you do that, you can open your Arduino IDE and then navigate to that folder. Inside the folder, there is a sketch file namedLCD_1inch28.inowhich you will want to open.
You can see from the code that after loading some libraries we initialize the display, set its backlight level (you can use PWM on the BL pin to set the level), and paint a new image. We then proceed to draw lines and strings onto the display.
Unfortunately, Waveshare doesn’t offer documentation for this, but you can gather quite a bit of information by reading theLCD_Driver.cppfile, where the functions are somewhat documented.
After uploading the code, you will see the display show a fake “clock”. It’s a static display, but it does illustrate how you can use this with the Waveshare code.
This library is an extension of the Adafruit GFX library, which itself is one of the most popular display libraries around. Because of this, there isextensive documentation for this libraryavailable from Adafruit. This makes the library an excellent choice for those who want to write their own applications.
As with the Waveshare sample, this file just prints shapes and text to the display. It is quite an easy sketch to understand, especially with the Adafruit documentation.
The sketch finishes by printing some bizarre text on the display. The text is an excerpt from The Hitchhiker’s Guide to the Galaxy by Douglas Adams, and it’s a sample of Vogon poetry, which is considered to be the third-worst in the Galaxy!
Here is the hookup for the ESP32 and the GC9A01 display. As with most ESP32 hookup diagrams, it is important to use the correct GPIO numbers instead of physical pins. The diagram shows the WROVER, so if you are using a different module you’ll need to consult its documentation to ensure that you hook it up properly.
The TFT_eSPI library is ideal for this, and several other, displays. You can install it through your Arduino IDE Library Manager, just search for “TFT_eSPI”.
There is a lot of demo code included with the library. Some of it is intended for other display sizes, but there are a few that you can use with your circular display.
To test out the display, you can use theColour_Test sketch, found inside the Test and Diagnostic menu item inside the library samples. While this sketch was not made for this display, it is a good way to confirm that you have everything hooked up and configured properly.
A great demo code sample is theAnimated_dialsketch, which is found inside theSpritesmenu item. This demonstration code will produce a “dial” indicator on the display, along with some simulated “data” (really just a random number generator).
One of my favorite sketches is the Animated Eyes sketch, which displays a pair of very convincing eyeballs that move. Although it will work on a single display, it is more effective if you use two.
The first thing we need to do is to hook up a second display. To do this, you connect every wire in parallel with the first display, except for the CS (chip select) line.
The Animated Eyes sketch can be found within the sample files for the TFT_eSPI library, under the “generic” folder. Assuming that you have wired up the second GC9A01 display, you’ll want to use theAnimated_Eyes_2sketch.
The GC9A01 LCD module is a 1.28-inch round display that is useful for instrumentation and other similar projects. Today we will learn how to use this display with an Arduino Uno and an ESP32.
[deshipu] aka [Radomir Dopieralski] has been building educational handhelds for a good part of a decade now, and knows how to design hardware that makes for effective teaching. Today, we are graced with the PewPew LCD project, latest in the PewPew student-friendly handheld series, powered by CircuitPython.
It’s exceptionally simple to get into writing games for the PewPew – one of the reasons why it’s a strong platform for workshops and individual learning. There’s already a slew of games and tutorials, and we can’t wait to see all the cool games people can build when given all the extra pixels! And, of course, we appreciate setting an example for giving new life to old displays – displays that’d otherwise inevitably end up in a trash container behind a warehouse in China.
NumWorks: Technically we’re not a fork but rather a port. We’re sticking to the core MicroPython engine, and added what it took to properly integrate it into our device.