Skip to content

Instantly share code, notes, and snippets.

@ntoll
Created June 25, 2018 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntoll/99761319c80d29fd6846e9fe8f8bb5af to your computer and use it in GitHub Desktop.
Save ntoll/99761319c80d29fd6846e9fe8f8bb5af to your computer and use it in GitHub Desktop.
Code for reading the light-sensor readings from a Circuit Playground Express board by Adafruit.
import time
import analogio
import board
light = analogio.AnalogIn(board.LIGHT)
while True:
print((light.value,))
time.sleep(0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment