Hello,
When I run the Arduino example I provided and your Processing code the rectangle changes color from black to white as expected and repeats every 1000 ms.
Can you share a screen grab of what you are seeing on the serial monitor of the Arduino IDE when you start Arduino and scan a card?
:)