Joy-it RB-P-XPLR-SET handleiding

37 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 10 van 37
4.4 TFT
The liquid crystal display (LCD TFT) with around 65,000 colors and a diagonal of 1.8 inches has a resolution of 128×160 pixels and can be controlled via SPI.
It is suitable for displaying colorful graphics and images. Letters and other characters are displayed as graphics made up of many individual dots.
The TFT is connected to the GPIO pins GP17 (CS), GP3 (DC), GP6 (RES) and GP2 (BL).
In addition to texts, rectangles can also be displayed, for example:
ATTENTION! Two separate library files and a font file are required for the TFT display; you can download
the required files here. Then transfer all files from the Libraries folder to the root directory of your
Raspberry Pi Pico so that the folder structure looks like this:
from machine import Pin, SPI
import ST7735
# Initialize LCD
spi = SPI(0, baudrate=8000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(19),
miso=Pin(16))
lcd = ST7735.ST7735(spi, rst=6, ce=17, dc=3)
backlight = Pin(2, Pin.OUT)
# Turn backlight on
backlight.high()
lcd.reset()
lcd.begin()
# Display content on the LCD
lcd.ll_screen(lcd.rgb_to_565(0, 255, 0)) # Fills the screen with a green color
# Display text
lcd.p_string(20, 50, ‚Hello, World!‘)
# Draw red rectangle
lcd.draw_block(10, 10, 50, 50, lcd.rgb_to_565(255, 0, 0))
10

Bekijk gratis de handleiding van Joy-it RB-P-XPLR-SET, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.

Productinformatie

MerkJoy-it
ModelRB-P-XPLR-SET
CategorieNiet gecategoriseerd
TaalNederlands
Grootte21690 MB