Many robotic projects use multiple Color Sensors. So it is essential to have an extra one handy all the time.
These are some examples of projects that use multiple Color Sensors:
Through the use of a QikEasy Adapter, your EV3 Color Sensor emulates a regular Spike Prime Color Sensor. As such, you can use the EV3 Color Sensor in exactly the same way as a normal Spike Prime or Robot Inventor Color Sensor.
Compare to a regular Spike Prime Color Sensor, the only thing missing in our EV3 emulated Color Sensor is the ability to turn on the LED light on the front face of the sensor.
Word Editor only allows user to access Discrete Colors, RGB Colors and Reflective Index. With Python, you would be able to access other low level modes. The following example shows how you can use Python to access the Low Level Color Sensor modes supported by our adapter. When you try this code, make sure you will change line 5 so that color_sensor points to the correct Port.
import hub from utime import sleep_ms # See https://lego.github.io/MINDSTORMS-Robot-Inventor-hub-API/class_device.html for documentation color_sensor = hub.port.A.device def decode_color( code ): if code==None or code<-1 or code>10: return "Unknown" else: return { -1: "No Color", 0: "Black", 1: "Violet", 2: "Unknown", 3: "Blue", 4: "Teal or Light Blue", 5: "Green", 6: "Unknown", 7: "Yellow", 8: "Unknown", 9: "Red", 10: "White" }[ code ] color_sensor.mode(0) for x in range(30): sleep_ms(500) c = color_sensor.get(0)[0]; print("Mode(0):Discrete Color=", decode_color(c), "(", c, ")") sleep_ms(1500) color_sensor.mode(1) for x in range(30): sleep_ms(500) print("Mode(1):REFL", color_sensor.get(0)) sleep_ms(1500) color_sensor.mode(2) for x in range(30): sleep_ms(500) print("Mode(2):AMBI", color_sensor.get(0)) sleep_ms(1500) color_sensor.mode(4) for x in range(30): sleep_ms(500) print("Mode(4):RAW REFL", color_sensor.get(0)) sleep_ms(1500) color_sensor.mode(5) for x in range(30): sleep_ms(500) print("Mode(5):RGB", color_sensor.get(0)) sleep_ms(1500) color_sensor.mode(6) for x in range(30): sleep_ms(500) print("Mode(6):HSV", color_sensor.get(0))