Skip to content

Commit 59f2c35

Browse files
authored
Update esp_atcontrol_simpletest.py
For some reason the Adafruit code has TX and RX swapped for the default board assignments... Flipped back for challenger..
1 parent 7cfeca6 commit 59f2c35

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/esp_atcontrol_simpletest.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
23
# SPDX-License-Identifier: MIT
34

@@ -18,11 +19,11 @@
1819

1920

2021
if board.board_id == "challenger_rp2040_wifi":
21-
RX = board.ESP_TX
22-
TX = board.ESP_RX
22+
RX = board.ESP_RX
23+
TX = board.ESP_TX
2324
resetpin = DigitalInOut(board.WIFI_RESET)
24-
# rtspin = DigitalInOut(board.ESP_CTS)
25-
uart = busio.UART(board.ESP_TX, board.ESP_RX, baudrate=11520)
25+
rtspin = False
26+
uart = busio.UART(TX, RX, baudrate=11520)
2627
esp_boot = DigitalInOut(board.WIFI_MODE)
2728
esp_boot.direction = Direction.OUTPUT
2829
esp_boot.value = True
@@ -40,7 +41,7 @@
4041
print("ESP AT commands")
4142
# I had to remove the rtspin from the esp bellow to get the challenger_rp2040_wifi to work.
4243
esp = adafruit_espatcontrol.ESP_ATcontrol(
43-
uart, 115200, reset_pin=resetpin, debug=False
44+
uart, 115200, reset_pin=resetpin, rts_pin=rtspin, debug=False
4445
)
4546
print("Resetting ESP module")
4647
esp.hard_reset()

0 commit comments

Comments
 (0)