First off the code:
for (int i = 0; i < 25; i++)
{
robot.delay(1000);// wait 1 second
Color pixel_4 = robot.getPixelColor(x-15, 30);
System.out.println(pixel_4.getRed() + " " + pixel_4.getGreen() + " " + pixel_4.getBlue());
}
That is not the exact code I am using, but it produces the same situation: If I run this loop in a program and the screen is precisely the same for the entire loop it will occasionally output something like:
255 255 255
... (same color)
...
...
...
...
...
...
...
124 142 012 <---- this is the issue
255 255 255
As far as I can tell, the screen is static, but the robot.getPixelColor(x,y) method returned a false set of values.
Does anyone have any experience or intuition about this? Is there anything I can do to prevent it from happening?
Thanks