File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 1- import board
2- import busio
31import time
42import random
3+ import board
54from digitalio import DigitalInOut , Direction
6- from analogio import AnalogIn
75import pulseio
86from adafruit_esp32spi import adafruit_esp32spi
97
108
11- """
12- ESP32SPI Digital and Analog Pin Reads & Writes
9+ # ESP32SPI Digital and Analog Pin Reads & Writes
1310
14- This example targets a Feather M4 or ItsyBitsy M4 as the CircuitPython processor,
15- along with either an ESP32 Feather or ESP32 Breakout as Wi-Fi co-processor.
16- You may need to choose different pins for other targets.
17- """
11+ # This example targets a Feather M4 or ItsyBitsy M4 as the CircuitPython processor,
12+ # along with either an ESP32 Feather or ESP32 Breakout as Wi-Fi co-processor.
13+ # You may need to choose different pins for other targets."""
1814
1915
2016def esp_reset_all ():
@@ -44,6 +40,7 @@ def esp_init_pin_modes(din, dout):
4440 esp .set_pin_mode (dout , 0x1 ) # Red LED on ESP32 Feather and ESP32 Breakout
4541
4642def esp_status_text (n ):
43+ text = 'WL_UNDEFINED'
4744 t = {0 : 'WL_IDLE_STATUS' ,
4845 1 : 'WL_NO_SSID_AVAIL' ,
4946 2 : 'WL_SCAN_COMPLETED' ,
@@ -54,11 +51,10 @@ def esp_status_text(n):
5451 7 : 'WL_AP_LISTENING' ,
5552 8 : 'WL_AP_CONNECTED' ,
5653 9 : 'WL_AP_FAILED' ,
57- 10 : 'WL_NO_SHIELD' , }
54+ 10 : 'WL_NO_SHIELD' , }
5855 if n in t :
59- return t [n ]
60- else :
61- return 'WL_UNDEFINED'
56+ text = t [n ]
57+ return text
6258
6359
6460# M4 R/W Pin Assignments
You can’t perform that action at this time.
0 commit comments