Hi, I have an interesting issue here, I have a touchscreen, from which I can get two values, one X position, one Y position. I wish to use these two values to manipulate a BlinkM I2C RGB LED to make it produce some colours. The colours are (int rgb hex color values):
Red (0xFF,0x00,0x00)
Purple (0x66,0x33,0xFF)
Yellow (0xFF,0xFF,0x00)
Blue (0x00,0x00,0xFF)
White (0xFF,0xFF,0xFF)
I wish to have each of the first colors acutated to their full values at the four corners of the pad, and as you move your finger between corners, I wish to morph the colors in the space between the corners, possibly using white as the vale of having your finger at the dead center of the screen.
I believe I will need to design an algorithim or three to use the two input values and to produce each channel of color, which I will send to the I2C bus. I am perfectly comfortable using the I2C setup, I just need to work out how to get to work on the algorithim. Can anyone point me in the right direction?