Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

DFRobot LCD Keypad Shield


  • Please log in to reply
5 replies to this topic

#1 Eric Falsken

Eric Falsken

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationSan Francisco, CA, USA

Posted 27 November 2011 - 03:44 AM

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.

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 27 November 2011 - 11:04 AM

Oh nice! Thanks for sharing!
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 27 November 2011 - 12:02 PM

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.

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

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 Eric Falsken

Eric Falsken

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationSan Francisco, CA, USA

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 Hoss

Hoss

    New Member

  • Members
  • Pip
  • 1 posts

Posted 21 December 2011 - 12:47 AM

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!

#6 Eric Falsken

Eric Falsken

    Member

  • Members
  • PipPip
  • 25 posts
  • LocationSan Francisco, CA, USA

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

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.