   return count;
 }
 
+// For polling the game controller
 void sendPulse(byte pin)
 {
   digitalWrite(pin, HIGH);

    Serial.println(":Entering terminal mode");
    Serial.println(":Exit with Ctrl-D");
    char next = 0, last;
    byte out;
    bool ansi = false;
    for (;;) {
      if (Serial.available()) {
        last = next;
        next = Serial.read();
        sendEcho(next, last);

  delay(50); // Allow Gigatron software to process line
}

// Send list of decimal numbers as byte stream
void doBytes(char *line)
{
  do {
