Adafruit_Learning_System_Gu.../Make_It_Sense/light-plot/code.py
2022-02-22 15:13:49 -05:00

15 lines
337 B
Python

# SPDX-FileCopyrightText: 2018 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import analogio
import board
# Create the light sensor object to read from
light = analogio.AnalogIn(board.LIGHT)
# Do readings, be sure to pause between readings
while True:
print((light.value, ))
time.sleep(0.1)