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 4242
4343"""
4444
45+ import board
46+ import analogio
4547import audioio
4648from adafruit_pybadger .pybadger_base import PyBadgerBase
4749
@@ -55,6 +57,11 @@ class PyPortal(PyBadgerBase):
5557 _audio_out = audioio .AudioOut
5658 _neopixel_count = 1
5759
60+ def __init__ (self ):
61+ super ().__init__ ()
62+
63+ self ._light_sensor = analogio .AnalogIn (board .LIGHT )
64+
5865 @property
5966 def _unsupported (self ):
6067 """This feature is not supported on PyPortal."""
@@ -63,8 +70,6 @@ def _unsupported(self):
6370 # The following is a list of the features available in other PyBadger modules but
6471 # not available for PyPortal. If called while using a PyPortal, they will result in the
6572 # NotImplementedError raised in the property above.
66- play_file = _unsupported
67- light = _unsupported
6873 button = _unsupported
6974
7075
You can’t perform that action at this time.
0 commit comments