Skip to content

Instantly share code, notes, and snippets.

@Kirkman
Created June 11, 2016 20:39
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 Kirkman/21ccafb6d2bfcf935082476319b8c108 to your computer and use it in GitHub Desktop.
Save Kirkman/21ccafb6d2bfcf935082476319b8c108 to your computer and use it in GitHub Desktop.
Little snippet that I hope will make the color sensor work
# Connect the color sensor
cs = ColorSensor(); assert cs.connected
# List of modes available here: http://www.ev3dev.org/docs/sensors/lego-ev3-color-sensor/
cs.mode = 'COL-REFLECT'
# Get current color value
color_value = cs.value()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment