Hello,
With a Up&Down Button i be able to change my Setpoint. Now I want that my Uno remember the last Setpoint.
I want to store my Setpoint to my Eeprom. When I restart my Uno I want to see my last Setpoint
Is there someone who can help me?
const int downButtonPin = 7;
const int upButtonPin = 6;
int downButtonState = LOW;
int downReading;
int upButtonState = LOW;
int upReading;
int Setpoint;
void setup()
{
Serial.begin( 9600);
pinMode(downButtonPin, INPUT);// assign pins to the buttons
pinMode(upButtonPin, INPUT);// assign pins to the buttons
Serial.print("Setpoint:" );
}
void loop()
{
// Check states of pushbuttons, if pressed change setpoint up or down
upButtonState = digitalRead(upButtonPin);
if (upButtonState == 0)
Setpoint++;
downButtonState = digitalRead(downButtonPin);
if (downButtonState == 0)
Setpoint--;
Serial.println(Setpoint);
delay(100);
}