arduino mega and processing problem

So with the arduino code I have:
if (digitalRead(53)==HIGH) {
Serial.println("53!");
digitalWrite(13, HIGH);
delay(50);
}

problem solved by uploading SimpleDigitalFirmata to arduino rather than StandardFirmata

The first statement shows code that is NOT part of StandardFirmata. This implies that you diddled with the Standard Firmata sketch, and yet still expected it to perform correctly. Not a chance.