Digital imput via arduino to processing

It is always instructive to see the other posts made by a person asking... So, I gather you finally have gotten the Processing/Arduino distiction sorted out (earlier thread)

Lets see what you are doing. The Arduino code is sending two bytes roughly ten times a second. It can be sending 00, 10, 02 or 12 depending on the state of the switches.

The Processing colours a rectangle : IF "2" then white, if "1" then gray, else brown.

So.... if you only press one button on the Arduino then the other button's "0" signal will colour the rectangle ... (that is a hint)

Please please, when asking question make it clear which bit is not working. You may find - I have a few times - that explaining precisly what goes wrong, makes you find the error yourself (usually while writing the post, which then does not have to be sent :slight_smile: )

EACH time you ask include three things:
**1: What did you do?**That is the code, the circuit diagram, what commands, button pushes you do.
2: What did you want to happen? (f.ex: The LED blinks 5 times at left button push; the LED turns Green on temperature exceeding 20C)
3: What actually did happen? (f.ex: The LED blinked once; The RGB-LED turn Yellow instead of Green at 20C and turned Green at 30C)

BTW, there is a Processing forum, too.