[Digi-Key Follow me Issue 2] + Task Summary
[Copy link]
This post was last edited by Popular Technology on 2023-10-10 08:35
first part
the second part
【Task 1】
Request to display Chinese on the screen.
Complete solution: [Digi-Key Electronics Follow me Issue 2] + [Task 1] Control the screen to display Chinese https://en.eeworld.com/bbs/thread-1252854-1-1.html
Chinese display mainly depends on loading a Chinese character library.
code show as below:
# SPDX-FileCopyrightText: 2021 Tim C for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
CircuitPython simple text display demo
"""
import board
import terminalio
from adafruit_display_text import bitmap_label
from adafruit_bitmap_font import bitmap_font
font = bitmap_font.load_font("wenquanyi_9pt.pcf")
color = 0x00FF00
# Update this to change the text displayed.
text = "中文显示测试"
# Update this to change the size of the text displayed. Must be a whole number.
scale = 2
text_area = bitmap_label.Label(font, text=text, scale=scale)
text_area.x = 10
text_area.y = 10
board.DISPLAY.show(text_area)
while True:
pass
【Task 2】
There are two parts, one is to display the IP address of the connected wifi, and the other is to create a hotspot for others to connect.
Complete solution: [Digi-Key Follow me Issue 2] + [Task 2] Connect to WIFI and create a hotspot https://en.eeworld.com/bbs/thread-1256412-1-1.html
This part mainly uses the encapsulated functions, calls them and then connects them.
【Task 3】
Controlling the WS2812B light is to control the three LEDs in it to change colors through the protocol. This part also has a packaged library that can be called directly.
Complete solution: [Digi-Key Electronics Follow me Issue 2] + [Task 3] Key control ws2812B https://en.eeworld.com/bbs/thread-1258394-1-1.html
This is the main function. Of course, we can also choose other libraries. There is a library that can change colors.
【Task 4】
Task 4 is a multiple-choice task. I made a date and weather display case. This case mainly obtains the Json data in the URL, parses it, and then displays it.
Complete solution: [Digi-Key Follow me Issue 2] + [Task 4] Weather and time https://en.eeworld.com/bbs/thread-1258428-1-1.html
【Task 5】
Network control WS2812B. We already know how to control it through the previous case, here we add one more control through the network. The main application is MQTT learning.
Complete case: [Digi-Key Electronics Follow me Issue 2] + [Task 5] Network Control WS2812B https://en.eeworld.com/bbs/thread-1258475-1-1.html
We did not make our own MQTT server, but used the built-in one and connected it to control it. This is also a case directly provided on the official website.
【Summarize】
This Digi-Key mission is to let everyone learn how to use CircuitPython through this board. It is very easy to learn when combined with the development board. There is also a lot of information on the official website, which makes learning more convenient. At the same time, there are many experts who provide a lot of cases for reference. I am very grateful to EEWORLD and Digi-Key for co-hosting this event. I have also sorted out all the libraries and codes in the attachment below.
|