Skip to content

Commit bc538e8

Browse files
authored
Update esp_atcontrol_simpletest.py
adding logic to set the initialzations for challenger board
1 parent b8b1350 commit bc538e8

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

examples/esp_atcontrol_simpletest.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,24 @@
1717
raise
1818

1919

20-
# With a Particle Argon
21-
RX = board.ESP_TX
22-
TX = board.ESP_RX
23-
resetpin = DigitalInOut(board.WIFI_RESET)
24-
rtspin = DigitalInOut(board.ESP_CTS)
25-
uart = busio.UART(TX, RX, timeout=0.1)
26-
esp_boot = DigitalInOut(board.ESP_BOOT_MODE)
27-
esp_boot.direction = Direction.OUTPUT
28-
esp_boot.value = True
20+
if board.board_id == challenger_rp2040_wifi:
21+
RX = board.ESP_TX
22+
TX = board.ESP_RX
23+
resetpin = DigitalInOut(board.WIFI_RESET)
24+
rtspin = DigitalInOut(board.ESP_CTS)
25+
uart = busio.UART(TX, RX, timeout=0.1)
26+
esp_boot = DigitalInOut(board.ESP_BOOT_MODE)
27+
esp_boot.direction = Direction.OUTPUT
28+
esp_boot.value = True
29+
else:
30+
RX = board.ESP_TX
31+
TX = board.ESP_RX
32+
resetpin = DigitalInOut(board.ESP_WIFI_EN)
33+
rtspin = DigitalInOut(board.ESP_CTS)
34+
uart = busio.UART(TX, RX, timeout=0.1)
35+
esp_boot = DigitalInOut(board.ESP_BOOT_MODE)
36+
esp_boot.direction = Direction.OUTPUT
37+
esp_boot.value = True
2938

3039

3140
print("ESP AT commands")

0 commit comments

Comments
 (0)