Save current changes before reorganizing drivers and cleaning workspace
This commit is contained in:
@@ -10,7 +10,7 @@ except ImportError:
|
||||
if sys.platform == 'rp2':
|
||||
import st7796 as display_module
|
||||
else:
|
||||
import rlcd as display_module
|
||||
import ili9341 as display_module
|
||||
from machine import Pin, SPI
|
||||
import wifi_config
|
||||
|
||||
@@ -24,13 +24,13 @@ def connect_wifi():
|
||||
# Initialize display to show connection progress
|
||||
display = None
|
||||
try:
|
||||
# ESP32-S3 configuration
|
||||
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(11), mosi=Pin(12))
|
||||
display = display_module.RLCD(spi, cs=Pin(40), dc=Pin(5), rst=Pin(41))
|
||||
# ESP32-S3 configuration for Hosyond Board
|
||||
spi = SPI(1, baudrate=40000000, polarity=0, phase=0, sck=Pin(12), mosi=Pin(11), miso=Pin(13))
|
||||
display = display_module.ILI9341(spi, cs=Pin(10), dc=Pin(46), bl=Pin(45), rst=None)
|
||||
display.clear(0)
|
||||
|
||||
display.text("ESP32-S3-RLCD-4.2", 10, 10, 1)
|
||||
display.line(10, 20, 390, 20, 1)
|
||||
display.text("Hosyond ESP32-S3", 10, 10, 1)
|
||||
display.line(10, 20, 310, 20, 1)
|
||||
display.text("Connecting to Wi-Fi...", 10, 35, 1)
|
||||
display.text(f"SSID: {wifi_config.WIFI_SSID}", 10, 50, 1)
|
||||
display.show()
|
||||
@@ -71,8 +71,8 @@ def connect_wifi():
|
||||
print(f"Wi-Fi Connected! IP Address: {ip}")
|
||||
if display:
|
||||
display.clear(0)
|
||||
display.text("ESP32-S3-RLCD-4.2", 10, 10, 1)
|
||||
display.line(10, 20, 390, 20, 1)
|
||||
display.text("Hosyond ESP32-S3", 10, 10, 1)
|
||||
display.line(10, 20, 310, 20, 1)
|
||||
display.text("Wi-Fi Status: Connected!", 10, 35, 1)
|
||||
display.text(f"SSID: {wifi_config.WIFI_SSID}", 10, 50, 1)
|
||||
display.text(f"IP: {ip}", 10, 65, 1)
|
||||
@@ -83,9 +83,9 @@ def connect_wifi():
|
||||
print("Wi-Fi Connection Failed.")
|
||||
if display:
|
||||
display.clear(0)
|
||||
display.text("ESP32-S3-RLCD-4.2", 10, 10, 1)
|
||||
display.line(10, 20, 390, 20, 1)
|
||||
display.text("Wi-Fi Status: Connection Failed!", 10, 35, 1)
|
||||
display.text("Hosyond ESP32-S3", 10, 10, 1)
|
||||
display.line(10, 20, 310, 20, 1)
|
||||
display.text("Wi-Fi Status: Failed!", 10, 35, 1)
|
||||
display.text("Check credentials in:", 10, 55, 1)
|
||||
display.text("wifi_config.py", 20, 70, 1)
|
||||
display.text("Starting offline...", 10, 95, 1)
|
||||
|
||||
Reference in New Issue
Block a user