lcd keypad shiled problem

Discussion about online shopping at Cytron website

lcd keypad shiled problem

Postby skyrock » Thu Mar 12, 2015 6:23 pm

hello,

I have just purchased and tested the lcd kepad shield. Using the sample code from your site with ct-uno + lcd keypad shield without any other modification. However, the keypad reads incorrectly. Is the shield malfunction?

regards,
Sky
skyrock
Greenhorn
 
Posts: 2
Joined: Thu Mar 12, 2015 6:19 pm

Re: lcd keypad shiled problem

Postby ober » Thu Mar 12, 2015 11:34 pm

What is the incorrect value? Can you show it?
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1442
Joined: Wed Apr 15, 2009 1:03 pm

Re: lcd keypad shiled problem

Postby skyrock » Fri Mar 13, 2015 10:22 am

when i press the right key, it shows right. But when i pressed the up key, it shows left. and down key becomes select. both left and select key was not detected.

I have not modified the source code.

regards.

*edit*
i have used another code and found that the value for right is 0, up is 512, down is 683, left is 768, select is 819
skyrock
Greenhorn
 
Posts: 2
Joined: Thu Mar 12, 2015 6:19 pm

Re: lcd keypad shiled problem

Postby ober » Sun Mar 15, 2015 10:25 pm

The LCD keypad shield is using resistor ladder to detect key press. The resistor value might not be same as other LCD keypad shield. So reading the ADC value and replace it in the example sketch would fix the problem.

Example, the original sketch:
int adc_key_val[5] ={30, 150, 360, 535, 760 };

replace it with what you see at ADC value:
int adc_key_val[5] ={0, 512, 683, 768, 819 };

Try it.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1442
Joined: Wed Apr 15, 2009 1:03 pm


Return to Online Shopping

Who is online

Users browsing this forum: No registered users and 7 guests