code.py
 1  # SPDX-FileCopyrightText: 2018 Anne Barela for Adafruit Industries
 2  #
 3  # SPDX-License-Identifier: MIT
 4  
 5  import time
 6  import analogio
 7  import board
 8  
 9  # Create the light sensor object to read from
10  light = analogio.AnalogIn(board.LIGHT)
11  
12  # Do readings, be sure to pause between readings
13  while True:
14      print((light.value, ))
15      time.sleep(0.1)