Skip to content

Commit 318c7ae

Browse files
authored
Merge pull request #39 from brentru/update-simpletest
Updating simpletest/aio_send - adding externally defined pins for breakout, etc
2 parents 011a9d6 + 24b566b commit 318c7ae

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

examples/esp32spi_aio_post.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,15 @@
1515
print("WiFi secrets are kept in secrets.py, please add them there!")
1616
raise
1717

18-
# for externally connected ESP32
19-
esp32_cs = DigitalInOut(board.D9)
20-
esp32_ready = DigitalInOut(board.D10)
21-
esp32_reset = DigitalInOut(board.D5)
22-
23-
# For PyPortal use
24-
"""
18+
# If you are using a board with pre-defined ESP32 Pins:
2519
esp32_cs = DigitalInOut(board.ESP_CS)
2620
esp32_ready = DigitalInOut(board.ESP_BUSY)
2721
esp32_reset = DigitalInOut(board.ESP_RESET)
28-
"""
2922

23+
# If you have an externally connected ESP32:
24+
# esp32_cs = DigitalInOut(board.D9)
25+
# esp32_ready = DigitalInOut(board.D10)
26+
# esp32_reset = DigitalInOut(board.D5)
3027

3128
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
3229
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)

examples/esp32spi_simpletest.py

+7
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@
1010
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
1111
JSON_URL = "http://api.coindesk.com/v1/bpi/currentprice/USD.json"
1212

13+
14+
# If you are using a board with pre-defined ESP32 Pins:
1315
esp32_cs = DigitalInOut(board.ESP_CS)
1416
esp32_ready = DigitalInOut(board.ESP_BUSY)
1517
esp32_reset = DigitalInOut(board.ESP_RESET)
1618

19+
# If you have an externally connected ESP32:
20+
# esp32_cs = DigitalInOut(board.D9)
21+
# esp32_ready = DigitalInOut(board.D10)
22+
# esp32_reset = DigitalInOut(board.D5)
23+
1724
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
1825
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
1926

0 commit comments

Comments
 (0)