{ if (Serial.available()) { nextChar = Serial.read(); // read just one character buttonState1 = digitalRead(buttonPin1); // read the state of the pushbutton value: buttonState2 = digitalRead(buttonPin2); // read the state of the pushbutton value:

A couple of things. First, your buttons will do nothing unless someone presses a character because you've got the whole loop surrounded by a "if (Serial.available())" test.

Second, how do you have your buttons wired up? Are they connected to 0V? 5V? It's common to connect pushbuttons from the digital input to 0V, then enable the pullup resistor on the digital input. Then, the digital input reads high when NOT pressed, and low when pressed.

But again, I think you're going to have trouble with your switches. If you push it, it will be connected to 5V and read HIGH. If you don't push it....what is it connected to? Nothing? Then it will be floating and may continue to read HIGH all the time. If this is your scheme then at least connect a 10k resistor from the digital input to ground to keep it from floating when the switch is not pushed.