DFRobot LCD Keypad Shield
#1
Posted 27 November 2011 - 03:44 AM
#2
Posted 27 November 2011 - 11:04 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 27 November 2011 - 12:02 PM
Could you use a simple voltage divider and adjust the values for the switches to help differentiate between the select and none switch states?Happy to report that it works very well, except for the "Select" button. If they would have used Aref instead of 5v, it would have been flawless. My code and summary is in the wiki.
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#4
Posted 27 November 2011 - 05:39 PM
Could you use a simple voltage divider and adjust the values for the switches to help differentiate between the select and none switch states?
Regards,
Mark
The resistors that do the dividing must be located under the LCD. You could hack it by soldering a resistor directly from the A0 terminal to ground (which isn't far away thanks to some breakout headers) but I'm still learning my resistor math and wouldn't know which value to use.
#5
Posted 21 December 2011 - 12:47 AM
However, I was wondering if anyone could shed some light on a weird issue I've seen.
I found that if I instantiate my DfRobotLcdShield class with the class type (instead of var), I just get garbage on the display.
For example, this works fine...
var lcdshield = new DfRobotLcdShield();
This does not (produces garbage output on the screen)...
DfRobotLcdShield lcdshield = new DfRobotLcdShield();
I'm not opposed to using var, but two things...
- Just plain curiass as to why this is.
- I would like to make a global field for the LCD but from my understanding, var can not be used as a global field.
TIA!
#6
Posted 21 December 2011 - 03:29 PM
Thanks for your post, I got my LCD displaying text.
However, I was wondering if anyone could shed some light on a weird issue I've seen.
I found that if I instantiate my DfRobotLcdShield class with the class type (instead of var), I just get garbage on the display.
For example, this works fine...
var lcdshield = new DfRobotLcdShield();
This does not (produces garbage output on the screen)...
DfRobotLcdShield lcdshield = new DfRobotLcdShield();
I'm not opposed to using var, but two things...
- Just plain curiass as to why this is.
- I would like to make a global field for the LCD but from my understanding, var can not be used as a global field.
TIA!
Replacing it with "var" should not make a difference. But I've noticed many times that simply resetting it at the wrong time does not "flush" the buffer. Try pressing the reset switch when you see garbage on the screen, or remove power and plug it back in again. This clears up the screen 100% of the time (for me). Try putting a delay of about 20ms before writing anything to the display. It takes a short time to initialize before it's ready to listen.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users