We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55211ba commit f8a6dabCopy full SHA for f8a6dab
1 file changed
PyPortal_Twin_Peaks/main.py
@@ -3,7 +3,6 @@
3
# Tutorial: https://learn.adafruit.com/twin-peaks-light-reactive-pyportal-picture-frame
4
import time
5
import board
6
-import displayio
7
from analogio import AnalogIn
8
from adafruit_pyportal import PyPortal
9
@@ -18,16 +17,16 @@
18
17
gottaLight = (cwd+"/gottaLight.wav")
19
20
pyportal = PyPortal(default_bg=laura)
21
-
+
22
def getVoltage(pin): # helper
23
return (pin.value * 3.3) / 65536
24
25
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
+ if getVoltage(analogin) > 0.175:
+ pyportal.set_background(laura)
+ time.sleep(1)
+ else:
+ pyportal.set_background(woodsman)
+ pyportal.play_file(gottaLight)
0 commit comments