@@ -43,7 +43,11 @@ def __init__(
43
43
:param ESP_SPIcontrol esp: The ESP object we are using
44
44
:param dict secrets: The WiFi and Adafruit IO secrets dict (See examples)
45
45
:param status_pixel: (Optional) The pixel device - A NeoPixel, DotStar,
46
- or RGB LED (default=None)
46
+ or RGB LED (default=None). The status LED, if given, turns red when
47
+ attempting to connect to a Wi-Fi network or create an access point,
48
+ turning green upon success. Additionally, if given, it will turn blue
49
+ when attempting an HTTP method or returning IP address, turning off
50
+ upon success.
47
51
:type status_pixel: NeoPixel, DotStar, or RGB LED
48
52
:param int attempts: (Optional) Failed attempts before resetting the ESP32 (default=2)
49
53
:param const connection_type: (Optional) Type of WiFi connection: NORMAL or ENTERPRISE
@@ -128,7 +132,7 @@ def _get_next_ap(self):
128
132
129
133
def connect_normal (self ):
130
134
"""
131
- Attempt a regular style WiFi connection
135
+ Attempt a regular style WiFi connection.
132
136
"""
133
137
failure_count = 0
134
138
(ssid , password ) = self ._get_next_ap ()
@@ -242,6 +246,7 @@ def post(self, url, **kw):
242
246
self .connect ()
243
247
self .pixel_status ((0 , 0 , 100 ))
244
248
return_val = requests .post (url , ** kw )
249
+ self .pixel_status (0 )
245
250
return return_val
246
251
247
252
def put (self , url , ** kw ):
0 commit comments