   Timer1.pwm(PULSEPIN, 0);
   Timer1.start();
   
-  //Timer1.attachInterrupt(countSteps);
+  Timer1.attachInterrupt(countSteps);
 }
 
 



unsigned long lastmicros = micros();
int printcounter = 0;

void loop(){ 
  pidInput = encoder0Pos;
  if (abs(pidInput-pidSetpoint) < CLOSE_ENOUGH) {
    goalSpeed = 0;


// send status message

void sendOscStatus(long stepper, long encoder) {
  OscMessage msg("/status");
 
  msg.add(MOTOR_ID);
  msg.add("OK");
  msg.add((float)encoder0Pos); 
  msg.add(currentSpeed);
  msg.add(stepper);
  msg.add(encoder);
  
  etherOSC.send(msg, destination);
}
