My project is using a adb 5 button module to mimic the lcd shield buttons the problem im having is the buttons Im using are not going in same order as the shield buttons eg ( 30,170,390,600,800 ) my button module values are ( 0, 142, 329, 506, 743) so when i add my values to the sketch they dont work in the order they should like right button will be up left will be select etc anyone had similar problem ?
code:
int adc_key_val[5] ={ 0, 142, 329, 506, 743 };
int NUM_KEYS = 5;
int adc_key_in;
int key=-1;
int oldkey=-1;
if ((keypress == 0) Right
if ((keypress == 1) Up
if ((keypress == 2) Down
if ((keypress == 3) Left
if ((keypress == 4) Select
My button order:
Button 0 = Left
Button 1 = Up
Button 2 = Down
Button 3 = Right
Button 4 = Select