We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › Simulating a 7 Seg Display or a 16 x 2 LCD Display
Page Index Toggle Pages: 1
Simulating a 7 Seg Display or a 16 x 2 LCD Display (Read 1819 times)
Simulating a 7 Seg Display or a 16 x 2 LCD Display
Oct 28th, 2009, 4:29am
 
Hi,
I'm new to Arduino and Processing, but i'm diving straight in!
I was wondering, has anyone developed a library or a sketch that simulates a 7 seg display of 16 x 2 Char LCD Display?
I'm thinking that i can create a nice little GUI before i even develop any major hardware!
Your input or suggestions on where to start would be great!
Thanks

Pete
Re: Simulating a 7 Seg Display or a 16 x 2 LCD Display
Reply #1 - Nov 12th, 2009, 7:18am
 
Well you could just use the text command (look on the reference page) to print text to the screen. Look around for an 7-segment or LCD looking font, I'm sure someone has created something similar.

You could build some code to draw each segment of the character, and loop through each digit in a number. This wouldn't be too hard, but if you can find a font it would make things much simpler.
Re: Simulating a 7 Seg Display or a 16 x 2 LCD Display
Reply #2 - Nov 12th, 2009, 7:36am
 
look for such a shape. like the 8 as svg file or do it yourself and save every element as single layer/shape and then use http://processing.org/learning/basics/getchild.html to color the active one white, the inactive one black...
Re: Simulating a 7 Seg Display or a 16 x 2 LCD Display
Reply #3 - Nov 12th, 2009, 8:24am
 
I like the ideas mentioned here, but I just wanted to chime in to say that whenever I see a segmented display mimicked on a computer I think "what a waste of pixels!"

Maybe you're going for a retro look or you're trying to "echo" what your Arduino is writing to a real, physical display using the same code for driving the LCD.  In that case, I like Cedric's approach and withdraw my snarky "waste of pixels" comment.  Smiley
Re: Simulating a 7 Seg Display or a 16 x 2 LCD Display
Reply #4 - Nov 12th, 2009, 9:03am
 
hehe, yes its funny how people try to imitate the analog look that was just there because of the lack of possibilities. and now as there are no limitations we still try to make it look that way. Anyway. i thouht he just wants to simulate what he will later translate to hardware. so i believe this is a good way to do it.
Re: Simulating a 7 Seg Display or a 16 x 2 LCD Display
Reply #5 - Nov 14th, 2009, 3:25am
 
Hi,
Just to clarify I am trying to minic a LCD, so for development so i can see what the LCD is showing.
The Arduino project i'm trying to get working is to have a remote interface over ethernet connected to a computer or webpage and use processing as a GUI to see what its doing/showing.
Ok the project is starting off using the serial port as its much easier to control.
I will look into the GetChild function and see what it does and how to use it.
One thing i am struggling on is byte and bit manipulation, ie input in a Hex Value and it lights up 8 cells as needed, the same as LCD libraries.
Ok, i know i will only be using the 5 LSB bits and i'll bit mask the top bits, again whats the best way of doing this??

Again thanks for your support!

Pete
Page Index Toggle Pages: 1