/ examples / circuitplayground_light_plotter.py
circuitplayground_light_plotter.py
 1  """If you're using Mu, this example will plot the light levels from the light sensor (located next
 2  to the eye) on your CPX. Try shining a flashlight on your CPX, or covering the light sensor to see
 3  the plot increase and decrease."""
 4  import time
 5  from adafruit_circuitplayground.express import cpx
 6  
 7  while True:
 8      print("Light:", cpx.light)
 9      print((cpx.light,))
10      time.sleep(0.1)