Hi,
In this simple code I expect that the rectangle's colour keeps changing indefinetly. For some reason that's not happening. It changes the colour once and get's freezed on that one.
Code:void setup() {
size(200,200);
rectMode(CENTER);
}
void draw() {
background(0);
fill(255,0,0);
rect(100,100,50,50);
delay(200);
background(0);
fill(0,0,255);
rect(100,100,50,50);
delay(200);
}
I can`t find the reason why the code doesn't keep looping inside "draw()".
I need to figure this out because I'm having problems with a code that has to display different images depending on the information recieved from the serial port. I realized that after loading and displaying an image, the screen does not refresh (the next image is not displayed). I'm sure it's a display problem because the event that triggers the image change is working fine.
I hope that someone can help me with this.
Thanks!
Martin