// RIGHT for tuning parameters
// LEFT for OFF
// SHIFT for 10x tuning
// ************************************************
void Tune_Sp()
{
lcd.setBacklight(TEAL);
lcd.print(F("Set Temperature:"));
uint8_t buttons = 0;
while(true)
{
buttons = ReadButtons();
float increment = 0.1;
if (buttons & BUTTON_SHIFT)
{
increment *= 10;
}
if (buttons & BUTTON_LEFT)
{
opState = RUN;
return;
}
if (buttons & BUTTON_RIGHT)
{
opState = TUNE_P;
return;
}
if (buttons & BUTTON_UP)
{
Setpoint += increment;
delay(200);
}
if (buttons & BUTTON_DOWN)
{
Setpoint -= increment;
delay(200);
}
if ((millis() - lastInput) > 3000) // return to RUN after 3 seconds idle
{
opState = RUN;
return;
}
lcd.setCursor(0,1);
lcd.print(Setpoint);
DoControl();
}
}
Commentaires sur ces manuels