|
2 | 2 | import gc |
3 | 3 | import board |
4 | 4 | import busio |
5 | | -import adafruit_esp32spi |
6 | | -import adafruit_esp32spi.adafruit_esp32spi_socket as socket |
7 | | -from adafruit_esp32spi import adafruit_esp32spi |
| 5 | +from import adafruit_esp32spi import adafruit_esp32spi_socket as socket |
| 6 | +#import adafruit_esp32spi.adafruit_esp32spi_socket as socket |
| 7 | +from adafruit_esp32spi import adafruit_esp32spi, adafruit_esp32spi_wifimanager |
8 | 8 | import adafruit_requests as requests |
9 | 9 | import digitalio |
10 | 10 | import analogio |
|
15 | 15 | from adafruit_display_text import label |
16 | 16 | import adafruit_touchscreen |
17 | 17 |
|
18 | | -from adafruit_esp32spi import adafruit_esp32spi_wifimanager |
19 | 18 | from adafruit_minimqtt import MQTT |
20 | 19 |
|
21 | 20 | DISPLAY_COLOR = 0x4444FF |
|
85 | 84 | time_font = bitmap_font.load_font("/fonts/RobotoMono-72.bdf") |
86 | 85 | time_font.load_glyphs(b'0123456789:') |
87 | 86 |
|
88 | | -def get_local_timestamp(self, location=None): |
| 87 | +def get_local_timestamp(location=None): |
89 | 88 | # pylint: disable=line-too-long |
90 | 89 | """Fetch and "set" the local time of this microcontroller to the local time at the location, using an internet time API. |
91 | 90 | :param str location: Your city and country, e.g. ``"New York, US"``. |
@@ -221,7 +220,7 @@ def tick(self, now): |
221 | 220 | if self.current_time.tm_hour >= 12: |
222 | 221 | ampm_string = "PM" |
223 | 222 | self.text_areas[1].text = ampm_string |
224 | | - self.text_areas[2].text = (months[int(self.current_time.tm_mon - 1)] + |
| 223 | + self.text_areas[2].text = (months[int(self.current_time.tm_mon - 1)] + |
225 | 224 | " " + str(self.current_time.tm_mday)) |
226 | 225 | board.DISPLAY.refresh_soon() |
227 | 226 | board.DISPLAY.wait_for_frame() |
|
0 commit comments