 {
 
   static long next_millis = millis()+1000; 
+
+ int16_t enc = knob.read()>>2;
+ if (enc<0 || fastDigitalRead(ENC_BUTTON)==false)
+ {
+    knob.write(0);
+    enc=0;
+ }
+
 
  //block interrupts while retreiving the temperature values.
  noInterrupts();
  int16_t adc_copy=adc_value;
  int16_t temperature_copy=temperature_value;
+ int16_t current_sense_raw_copy = current_sense_raw;
+ Setpoint = enc; //set the PID loop to our encooder knob value
  interrupts();
  
  //convert to degrees C


  //Read the NVOL data as a test.
  Serial.println(nvol.a);
  
  //Setup the OLED
    // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)

    }
    //update the gains
    myPID.SetTunings(host_packet.param.kP, host_packet.param.kI, host_packet.param.kD);            // Set PID tunings  
  return_value=true;
  }
  Serial.flush();                         // * clear any random data from the serial buffer
  return return_value;
}
