mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
add rp2040 support to the wizard (#6239)
This commit is contained in:
parent
91e7a44c31
commit
b9bb3cd4be
@ -277,6 +277,7 @@ def wizard(path):
|
||||
from esphome.components.esp32 import boards as esp32_boards
|
||||
from esphome.components.esp8266 import boards as esp8266_boards
|
||||
from esphome.components.rtl87xx import boards as rtl87xx_boards
|
||||
from esphome.components.rp2040 import boards as rp2040_boards
|
||||
|
||||
if not path.endswith(".yaml") and not path.endswith(".yml"):
|
||||
safe_print(
|
||||
@ -343,7 +344,7 @@ def wizard(path):
|
||||
"firmwares for it."
|
||||
)
|
||||
|
||||
wizard_platforms = ["ESP32", "ESP8266", "BK72XX", "RTL87XX"]
|
||||
wizard_platforms = ["ESP32", "ESP8266", "BK72XX", "RTL87XX", "RP2040"]
|
||||
safe_print(
|
||||
"Please choose one of the supported microcontrollers "
|
||||
"(Use ESP8266 for Sonoff devices)."
|
||||
@ -373,6 +374,10 @@ def wizard(path):
|
||||
board_link = (
|
||||
"http://docs.platformio.org/en/latest/platforms/espressif8266.html#boards"
|
||||
)
|
||||
elif platform == "RP2040":
|
||||
board_link = (
|
||||
"https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html"
|
||||
)
|
||||
elif platform in ["BK72XX", "RTL87XX"]:
|
||||
board_link = "https://docs.libretiny.eu/docs/status/supported/"
|
||||
else:
|
||||
@ -397,6 +402,10 @@ def wizard(path):
|
||||
elif platform == "RTL87XX":
|
||||
safe_print(f"For example \"{color(Fore.BOLD_WHITE, 'wr3')}\".")
|
||||
boards_list = rtl87xx_boards.BOARDS.items()
|
||||
elif platform == "RP2040":
|
||||
safe_print(f"For example \"{color(Fore.BOLD_WHITE, 'rpipicow')}\".")
|
||||
boards_list = rp2040_boards.BOARDS.items()
|
||||
|
||||
else:
|
||||
raise NotImplementedError("Unknown platform!")
|
||||
|
||||
@ -423,6 +432,8 @@ def wizard(path):
|
||||
safe_print()
|
||||
sleep(1)
|
||||
|
||||
# Do not create wifi if the board does not support it
|
||||
if board not in ["rpipico"]:
|
||||
safe_print_step(3, WIFI_BIG)
|
||||
safe_print("In this step, I'm going to create the configuration for WiFi.")
|
||||
safe_print()
|
||||
@ -477,6 +488,8 @@ def wizard(path):
|
||||
sleep(0.25)
|
||||
safe_print("Press ENTER for no password")
|
||||
password = safe_input(color(Fore.BOLD_WHITE, "(password): "))
|
||||
else:
|
||||
ssid, password, psk = "", "", ""
|
||||
|
||||
if not wizard_write(
|
||||
path=path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user