File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 42
42
43
43
"""
44
44
45
+ import board
46
+ import analogio
45
47
import audioio
46
48
from adafruit_pybadger .pybadger_base import PyBadgerBase
47
49
@@ -55,6 +57,11 @@ class PyPortal(PyBadgerBase):
55
57
_audio_out = audioio .AudioOut
56
58
_neopixel_count = 1
57
59
60
+ def __init__ (self ):
61
+ super ().__init__ ()
62
+
63
+ self ._light_sensor = analogio .AnalogIn (board .LIGHT )
64
+
58
65
@property
59
66
def _unsupported (self ):
60
67
"""This feature is not supported on PyPortal."""
@@ -63,8 +70,6 @@ def _unsupported(self):
63
70
# The following is a list of the features available in other PyBadger modules but
64
71
# not available for PyPortal. If called while using a PyPortal, they will result in the
65
72
# NotImplementedError raised in the property above.
66
- play_file = _unsupported
67
- light = _unsupported
68
73
button = _unsupported
69
74
70
75
You can’t perform that action at this time.
0 commit comments