Skip to content

Commit e89b43e

Browse files
author
ladyada
committed
linted
1 parent ae510db commit e89b43e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CircuitPython_WeatherCloud/code.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import time
2+
import random
23
import board
34
import busio
4-
import random
55
from digitalio import DigitalInOut
66
import neopixel
77
from adafruit_esp32spi import adafruit_esp32spi
88
from adafruit_esp32spi import adafruit_esp32spi_wifimanager
9-
import adafruit_requests as requests
109
import adafruit_fancyled.adafruit_fancyled as fancy
1110

1211
print("ESP32 Open Weather API demo")
@@ -101,7 +100,7 @@
101100

102101
if raining:
103102
# don't have a droplet every time
104-
if (random.randint(0, 25) == 0): # 1 out of 25 times
103+
if random.randint(0, 25) == 0: # 1 out of 25 times
105104
pixels[random.randint(0, len(pixels)-1)] = 0xFFFFFF # make a random pixel white
106105
pixels.show()
107106

@@ -118,4 +117,3 @@
118117
time.sleep(random.uniform(0.01, 0.3)) # pause
119118
# pick next thunderbolt time now
120119
next_bolt_time = time.monotonic() + random.randint(5, 15) # between 5 and 15 s
121-

0 commit comments

Comments
 (0)