Skip to content

Commit f8a6dab

Browse files
authored
remove spaces and unused import
1 parent 55211ba commit f8a6dab

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

PyPortal_Twin_Peaks/main.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Tutorial: https://learn.adafruit.com/twin-peaks-light-reactive-pyportal-picture-frame
44
import time
55
import board
6-
import displayio
76
from analogio import AnalogIn
87
from adafruit_pyportal import PyPortal
98

@@ -18,16 +17,16 @@
1817
gottaLight = (cwd+"/gottaLight.wav")
1918

2019
pyportal = PyPortal(default_bg=laura)
21-
20+
2221
def getVoltage(pin): # helper
2322
return (pin.value * 3.3) / 65536
2423

2524
while True:
26-
27-
if getVoltage(analogin) > 0.175:
28-
pyportal.set_background(laura)
29-
time.sleep(1)
30-
else:
31-
pyportal.set_background(woodsman)
32-
pyportal.play_file(gottaLight)
33-
time.sleep(1)
25+
26+
if getVoltage(analogin) > 0.175:
27+
pyportal.set_background(laura)
28+
time.sleep(1)
29+
else:
30+
pyportal.set_background(woodsman)
31+
pyportal.play_file(gottaLight)
32+
time.sleep(1)

0 commit comments

Comments
 (0)