planetx.color
Appearance
Reads the color seen by a PlanetX color sensor (such as EF05006) 1 to 2 cm away, as a number from 1 to 7, or 0 if it is too dark.
Function
Synopsis
planetx.color()
Returns
1 for blue, 2 red, 3 magenta, 4 green, 5 cyan, 6 yellow, 7 white, or 0. An error is raised if no sensor answers.