Created
June 11, 2016 20:39
-
-
Save Kirkman/21ccafb6d2bfcf935082476319b8c108 to your computer and use it in GitHub Desktop.
Little snippet that I hope will make the color sensor work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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