spitfire79:
//21-03-2018 Correct code for prototype PCB
#include <Bounce2.h>
const int up = 8;
const int down = 9;
Bounce debouncer1=Bounce();
Bounce debouncer2=Bounce();
int upState = 0;
int downState = 0;
void setup() //Setup to run once at startup
{
pinMode(up,INPUT_PULLUP);
debouncer1.attach(up);
debouncer1.interval(5);
pinMode(down,INPUT_PULLUP);
debouncer2.attach(down);
debouncer2.interval(5);
}
void loop()
{
debouncer1.update();
debouncer2.update();
int value1=debouncer1.read();
int value2=debouncer2.read();
upState=digitalRead(up);
downState=digitalRead(down);
}
Why bother to set up those two debounce objects and then throw away the values they return?!? You read the debounced values into "value1" and "value2", never use those values, and read the input pins to get the current state.