 
 AltSoftSerial mySerial;
 int missedPackets = 0;
-
-// commands from the pi terminate with '.'
-char cmd[11] = "";
-char cmd2[11] = ""; // sse parity \o/
 
 enum states {
   NO_CLICK,

      if (missedPackets >= 15){
        missedPackets = 0;
        mySerial.readBytesUntil('.', cmd, 11);
      }
      //Serial.println("Packet miss");      
    }

  while (!Serial);
  AbsoluteMouse.begin();
  attachInterrupt(digitalPinToInterrupt(2), interrupt, RISING); //interrupt pin from Mega
  Serial.println("Ready");
}

void clickMouse(){
    if (state == CLICK){
    delay(500); //delay so if there's another interrupt it will change state
  }
  
