|
37 | 37 | # esp32_reset = DigitalInOut(board.D5) |
38 | 38 |
|
39 | 39 | spi = busio.SPI(board.SCK, board.MOSI, board.MISO) |
40 | | -esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset, gpio0_pin=esp32_gpio0) # pylint: disable=line-too-long |
| 40 | +esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset) # pylint: disable=line-too-long |
41 | 41 |
|
42 | 42 | """Use below for Most Boards""" |
43 | 43 | status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2) # Uncomment for Most Boards |
@@ -169,19 +169,19 @@ def led_color(environ): # pylint: disable=unused-argument |
169 | 169 | # Here we create our application, setting the static directory location |
170 | 170 | # and registering the above request_handlers for specific HTTP requests |
171 | 171 | # we want to listen and respond to. |
172 | | -static_dir = "/static" |
| 172 | +static = "/static" |
173 | 173 | try: |
174 | | - static_files = os.listdir(static_dir) |
| 174 | + static_files = os.listdir(static) |
175 | 175 | if "index.html" not in static_files: |
176 | 176 | raise RuntimeError(""" |
177 | 177 | This example depends on an index.html, but it isn't present. |
178 | | - Please add it to the {0} directory""".format(static_dir)) |
| 178 | + Please add it to the {0} directory""".format(static)) |
179 | 179 | except (OSError) as e: |
180 | 180 | raise RuntimeError(""" |
181 | 181 | This example depends on a static asset directory. |
182 | | - Please create one named {0} in the root of the device filesystem.""".format(static_dir)) |
| 182 | + Please create one named {0} in the root of the device filesystem.""".format(static)) |
183 | 183 |
|
184 | | -web_app = SimpleWSGIApplication(static_dir=static_dir) |
| 184 | +web_app = SimpleWSGIApplication(static_dir=static) |
185 | 185 | web_app.on("GET", "/led_on", led_on) |
186 | 186 | web_app.on("GET", "/led_off", led_off) |
187 | 187 | web_app.on("POST", "/ajax/ledcolor", led_color) |
|
0 commit comments