LCD for N+ - Page 3 - Netduino Plus 2 (and Netduino Plus 1) - Netduino Forums
   
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

LCD for N+


  • Please log in to reply
44 replies to this topic

#41 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 03 December 2012 - 05:10 AM

Not sure if you are needing to create and use Glyphs in your setup. I see you have the battery Glyph on the screen from my demo. I am working on a program to create the glyph code. I'll post it sometime tomorrow.


No, I am not using the battery indicator for anything at this moment but just grabbed from your code and show it as a demo of the stuff that can be shown.

Please do post the glyph code when you get a chance as I am interested in the degrees symbol as well as percentage for now but a whole library of glyphs would be great to have.

Thanks

#42 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 04 December 2012 - 12:39 AM

As promised here is the code for for my Glyph creator. It works for creating 5x8 characters for Character based LCD displays that allow Glyphs. Many LCD displays allow for up to 8 custom characters. The Glyph application allows you to visually design and see your glyphs then generate the line of code (byte array) needed.

Here is an example of how to create put the code in your Netduino application. The code "new byte[] { 0x0E, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, 0x1F };" is the part that was generated by the application. In my example code below I am using the MicroLiquidCrystal library.


// LCD Glyphs indexes (0-7)
const int LCD_BATTERY_1 = 0;

// LCD Glyphs
private static byte[] LCD_BATTERY_1_BYTE = new byte[] { 0x0E, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, 0x1F };

// Create Custom LCD Glyphs
LCD.CreateChar(LCD_BATTERY_1, LCD_BATTERY_1_BYTE);

// Show the Glyph at row 1, column 20
LCD.Print(0, 19, new byte[] { 0x01 }, 0, 1)

Attached Files



#43 Giuliano

Giuliano

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationSimi Valley, CA

Posted 04 December 2012 - 01:36 AM

As promised here is the code for for my Glyph creator. It works for creating 5x8 characters for Character based LCD displays that allow Glyphs. Many LCD displays allow for up to 8 custom characters. The Glyph application allows you to visually design and see your glyphs then generate the line of code (byte array) needed.

Here is an example of how to create put the code in your Netduino application. The code "new byte[] { 0x0E, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, 0x1F };" is the part that was generated by the application. In my example code below I am using the MicroLiquidCrystal library.


// LCD Glyphs indexes (0-7)
const int LCD_BATTERY_1 = 0;

// LCD Glyphs
private static byte[] LCD_BATTERY_1_BYTE = new byte[] { 0x0E, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, 0x1F };

// Create Custom LCD Glyphs
LCD.CreateChar(LCD_BATTERY_1, LCD_BATTERY_1_BYTE);

// Show the Glyph at row 1, column 20
LCD.Print(0, 19, new byte[] { 0x01 }, 0, 1)


Awesome Dave, I am going to give it a try.

Thanks for putting this together.

#44 grunzer

grunzer

    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 January 2013 - 12:38 AM

The very first thing I got for my N+ was the SparkFun LCD. Easy to connect. (3 wires - GND, +5V, and RX) Just open a serial port and start writing. Posted Image

Edit: I'm an idiot - I forgot we were in the GO! forum. Not 1005 sure the SparkFun one will work with the GO!.

I believe we are using the same Sparkfun LCD, sorry for asking I am new to C# and I am curious how you configured the code to write to the LCD and if you could provide an example or insight as how I can use this LCD module. I think I could use SPI and write to the RX line, the Sparkfun backpack is using a PIC 16F88 uc.

 

any help would be appreciated

 

Thanks



#45 Nevyn

Nevyn

    Advanced Member

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

Posted 03 January 2013 - 07:54 AM

You should be able to use the class and example found in this post to talk to the serial LCD.  Connect the power and ground lines to the N+.  Also connect the Rx line on the LCD module to the Tx line on the N+.

 

Hope this help,

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





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.