It looks like you need to revisit all those Serial.write calls - the "INT" is from a very much earlier version of the IDE.