Lcd shield buttons not working correctly

Hi I’m completely new to arduino and im having trouble with a DFRobot 1602 shield, I’ve loaded a test code that has a counter and when you press each individual button it tell you on the screen which button you are pressing, the problem I’m having is that up and down work fine but when I press select it shows left and when I press left it shows down, I thought I had a faulty shield so ordered 2 others from another supplier and they are exactly the same and I’ve also tried another Arduino Uno with the shield and it made no difference.

Any help would be greatly appreciated

Thanks

We don't have crystal balls to see what you have and what your code is.

Good luck!

Looks like the threshold values for the switches are not correct in the code. You need to read up and understand how these switches work on the analog port (lots out there), then change a few numbers in the code.

Try using this library https://github.com/MajicDesigns/MD_AButton and run the examples to see what you should have. One example is to tell you the numbers returned, the other probably works like your 'sample code'.

Thanks for your help, it was the switch data, after reading the values of the switches and inputting the correct data it all works fine