Explanation: This will print the RGB+W values currently registered by the color-sensor.
Place a red pellet under the color-sensor, and write the returned RGB+W values down. Now go to the function “setColors” and type the values you wrote down, into “color.setRed(R, G, B, W);”
Repeat this for each of the colors: Red, Green, Blue and Yellow.
READ ME NOTE: In order to enable the inclusion of the Color library, copy paste the entire “Color Library” folder, into the “Documents -> Arduino -> Libraries” folder.
Explanation: Reads the current color and prints it to the screen.
READ ME NOTE: In order to enable the inclusion of the Color library, copy paste the entire “Color Library” folder, into the “Documents -> Arduino -> Libraries” folder.
Explanation: The combined code so far.
READ ME NOTE: In order to enable the inclusion of the Color library, copy paste the entire “Color Library” folder, into the “Documents -> Arduino -> Libraries” folder.