 
 EthernetUDP UDP;
 OscUDP etherOSC;  
+
+// message serial numbers to check for missing ones
+int messageNumber = 0;
 
 int MSEC_PER_STATUS = 50; // millseconds between sending status messages
 



void oscGo(OscMessage &m) {
  // /go/motor0pos,motor1pos,motor2pos,motor3pos long ints
  if (state != OK) return; 
  
  double value = m.getFloat(MOTOR_ID);
  pidSetpoint = value;

  msg.add(stepper);
  msg.add(encoder);
  
  msg.add(messageNumber++);
  if (messageNumber > 32000) messageNumber = 0;
  
  etherOSC.send(msg, destination);
}

