//G04_VII void ProcesaBotones(void) { static bool BOTON_INC_presionado_ant = 0, estadoBOTON_INC; estadoBOTON_INC = 0; static bool BOTON_DEC_presionado_ant = 0, estadoBOTON_DEC; estadoBOTON_DEC = 0; if (BOTON_INC_PRESIONADO == BOTON_INC_presionado_ant) estadoBOTON_INC = 0; else { BOTON_INC_presionado_ant = BOTON_INC_PRESIONADO; estadoBOTON_INC = BOTON_INC_presionado_ant; } if (BOTON_DEC_PRESIONADO == BOTON_DEC_presionado_ant) estadoBOTON_DEC = 0; else { BOTON_DEC_presionado_ant = BOTON_DEC_PRESIONADO; estadoBOTON_DEC = BOTON_DEC_presionado_ant; } tpo_arranque_ms = (estadoBOTON_INC == 1) ? (tpo_arranque_ms + 1000) : (tpo_arranque_ms); tpo_arranque_ms = (estadoBOTON_DEC == 1) ? (tpo_arranque_ms - 1000) : (tpo_arranque_ms); tpo_arranque_ms = (tpo_arranque_ms < 1000) ? (1000) : (tpo_arranque_ms); tpo_arranque_ms = (20000 < tpo_arranque_ms) ? (20000) : (tpo_arranque_ms); Serial.println(tpo_arranque_ms); }