I have a canvas with a ball for RGB color picking. I'm trying to send the data to my arduino to parse and do stuff. I feel like the easiest way to do that is to always send a 9 digit number and parse it on my arduino code. So I'm trying to use leading zeros to always have 9 digits (000000000-255255255). This code seems to work over in the R area but not the other sections. Below is my serial monitor example.
is there another way to send and parse the RGB data that's easier, or can someone see what I did wrong with the leading zeros function?
Maybe I tried putting that in the wrong places, but with and without the leading zeros code it still doesn't produce the correct output. I've been working through this problem for two days and feel like there should be an apparent solution to the problem. But I'm not seeing one.
wouldn't the serial port not matter in this case? The problem seems to be with what is sent, not what is received. I have the arduino just printing whatever is received.
okay there's something wrong with the orange block. The only value that ever returns is the rgb for the yellowish color you put in "split color". No matter what the input is, the value printed is 255200000.
You will need to replace the colour block (yellowish color) with your canvas pixel background color x,y value blocks, so that when the canvas is touched that value is fed to the procedure.
do I replace it with the whole "split color > getbackgroundpixelcolor x y" Or can I just pop in the global variables R, G, and B since they're already set to the result of the "getpixelcolor x y"