Adafruit_RGBLCDShield lcd=Adafruit_RGBLCDShield(); intqty=0;// quantity of parts counted intdel=50;// global debounce duration for buttons intset=0;// user input number of parts to be counted uint8_ti=0;// reads
if (buttonDebounceCounter[row][index] > 0 && --buttonDebounceCounter[row][index] == 0) { // if the the debounce counter has // been decremented to 0 (meaning the // the button has been up for // kButtonUpDefaultDebounceCount // iterations/// buttonEvent[row] = 1 << index; //...
In case of using another I2C devices (AS5600,MCP23017...) - connect in parallel to same pins. Alternate options for buttons. Option #1: 74HC165 4-wire It is possible to get rid of PL wire (from 74HC165 to Arduino), and use only 4 wires. Wiring diagram: Changes in config.h: make...