1.Hello,Unihiker
Project Introduction¶
This project utilizes the dynamic display features of a flexible panel, providing the flexibility to adjust font color, size, and placement. It enables the presentation of any desired text. Below is an example that showcases the display of the phrase "Hello, Unihiker" on the screen.
Hardware Required¶
Code¶
When utilizing the unihiker library to display text on the screen, the initial step is to create a GUI object. Then, the draw_text() function of the GUI object is used to generate a text object, specifying the desired content, coordinate position, font size, color, and other attributes of the text. In cases where certain attributes of the text need to be updated or modified, the config() function of the text object can be directly used to achieve this.
hello_unihiker
from unihiker import GUI
import time
gui = GUI()
Text = gui.draw_text(text='Hello , Unihiker !',x=15,y=120,font_size=20)
Text.config(color='#0000FF')
while True:
time.sleep(1)