7 Segment Displays

Hints, tips and discussion about graphics and user interface elements

Moderators: electrogear, exonerate

7 Segment Displays

Postby trogluddite on Sat Feb 27, 2010 9:34 pm

Here's the latest update to my 7 segment displays - now version 3.

Should now use much less CPU for screen redraws - the number bitmap is now resampled when changing colour properties to avoid lots of colour matrix maths - and the on and off segments are now drawn as one layer (thanks to Mo for his inspiration with colour matrices)
Open the module properties to set the colours and number format.

7 Segment v3.png
7 Segment v3.png (31.12 KiB) Viewed 2388 times

7 Segment v3.osm
(76.02 KiB) Downloaded 330 times

The graphics are all held in one PNG file - there is an example in the .osm to show how to construct the grid of numbers if you fancy making your own.
Last edited by trogluddite on Wed Dec 22, 2010 5:13 pm, edited 5 times in total.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3028
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: 7 Segment Displays

Postby Andrew J on Sun Feb 28, 2010 12:57 am

Another nice one!
Andrew J
smanatic
 
Posts: 616
Joined: Tue May 29, 2007 4:53 am
Location: Australia

Re: 7 Segment Displays

Postby sunsynth on Sun Feb 28, 2010 5:24 pm

Clever idea with the masks... :)
Thanks again dude
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: 7 Segment Displays

Postby Jay on Mon Mar 01, 2010 12:54 am

great stuff Trog!

they look very crisp and clear m8! Thanks for these :)

Best Regards
The history of science shows that theories are perishable.With every new truth that is revealed,we get a better understanding of Nature and our conceptions and views are modified. - Nikola Tesla.
http://www.energeticforum.com/renewable-energy/
Jay
essemilian
 
Posts: 468
Joined: Mon Sep 22, 2008 7:20 pm
Location: Scotland.UK

Re: 7 Segment Displays

Postby AngularMomentum on Thu Mar 04, 2010 10:59 pm

Awesome...idea is great to design evrything in b/w for interfaces where users can select the hue themselves, I am going to give that a go with my next Synthmaker project. You could even give certain presets a "mood" color, so the hue changes with every preset.
User avatar
AngularMomentum
deliverer
 
Posts: 1405
Joined: Wed Dec 14, 2005 9:24 pm
Location: Southern Netherlands

Re: 7 Segment Displays

Postby Acrobat on Thu Mar 04, 2010 11:31 pm

thanks trogluddite, this is really cool, anyway I had some difficulties with the "power of 10" thing, still don't get it at all quite obscure IMHO... :S
User avatar
Acrobat
smaniac
 
Posts: 1660
Joined: Mon Jun 04, 2007 10:50 pm
Location: Roma, Italia

Re: 7 Segment Displays

Postby trogluddite on Fri Mar 05, 2010 2:44 am

Acrobat wrote:some difficulties with the "power of 10" thing

It was just the simplest way to make the digits format the right way - using the normal number formatting stuff wouldn't work because the digits are really bitmaps rather than a font, and I'm not too good with parsers.

Maybe this will help...

The number shown in the display is decimal, so the digits will represent...

etc... 1000s 100s 10s units point tenths hundredths thousandths ...etc.

The power if ten property says which is the biggest column that you want to show.
So if the bggest number you ever need to see is, say, 999 with two decimal places, you need to see the 100s, 10s, units, tenths and hundredths. The bggest of those is 100s - so you would put 100 into the power of ten property, and then have five of the little display modules chained together inside to give you enough digits.
Hope I haven't just made that even more confusing...

I'll try to make version two a bit easier to use - I need to make some changes anyway so that it will handle negative numbers, and I'd like the number of digits in the display to be a property as well really.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3028
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: 7 Segment Displays

Postby trogluddite on Fri Mar 05, 2010 9:27 pm

Upgraded to version two - the downloads are up in the top post.

Now far easier to use :) - the number of segments and number of decimal places can be put in as properties, and the whole thing will resize to fit the main module window, so you don't need to mess around inside to customise it for your GUI.
Can now also show negative numbers - the format for the png file has been changed to allow the minus sign (see example in the top post)

BTW - the string formatting module inside may look a bit clunky, but for some reason the format string primitive really doesn't like having a dynamically changing string for its format input - crashed my machine a few times. Means that I've fixed the maximum number of decimal places at 6, which should hopefully be accurate enough for any eventuality.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3028
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: 7 Segment Displays

Postby MegaHurtz on Fri Mar 05, 2010 9:59 pm

Nice!
User avatar
MegaHurtz
smaniac
 
Posts: 1522
Joined: Mon Aug 11, 2008 5:29 pm
Location: Eindhoven/Netherlands

Re: 7 Segment Displays

Postby trogluddite on Sat Mar 06, 2010 2:17 am

Version 3 now available at the top of the thread along with some snazzy (?) new graphic styles.

There are now seperate colour selectors for LEDs on, LEDs off and the bezel; and I've altered the way the bitmaps work to get rid of the annoying little line of pixels that appeared around the edges when the display was resized. The bitmaps are still just black on a transparent BG but are solid rather than cut-outs - the colours are done with colour matrices, so you'll get some wierd effects if you use colour bitmaps unless you change the module LED colours to black.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3028
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: 7 Segment Displays

Postby sunsynth on Sat Mar 06, 2010 3:51 pm

at first blush: perfect :love:

keep on doing... :)
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: 7 Segment Displays

Postby stw on Sat Mar 06, 2010 5:53 pm

yep... always appreciated!
stw
smanatic
 
Posts: 640
Joined: Mon Jun 30, 2008 2:55 pm

Re: 7 Segment Displays

Postby trogluddite on Fri May 14, 2010 11:28 am

Updated to version 2 (downloads in the top post) - ESSENTIAL BUG FIX.

BIG APOLOGY...
Sorry to anyone who downloaded the original version only to find that the display was blank when exported as a VST.
Many. many thanks to Nix; his recreated version of the schematic made finding my silly schoolboy error very much easier.
In the original file, I made a few too many things purgable - including the bitmap primitive holding the graphics!! xP

Moral of the story: ALWAYS test an exported version before posting!
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3028
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: 7 Segment Displays

Postby Dell on Sat May 15, 2010 1:25 am

No worries mate. :)
Dell
essemilian
 
Posts: 474
Joined: Sat Sep 26, 2009 6:45 pm
Location: New York

Re: 7 Segment Displays

Postby trogluddite on Wed Dec 22, 2010 5:23 pm

7 segment displays now updated to v3 - reduces the CPU load when re-drawing the numbers - see top post for downloads.

[EDIT] - just done some further testing - a 3 digit display updating from a tick 25 has dropped from 10% CPU (Q6700 Quad Core) down to unreadably low.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3028
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Next

Return to Graphics

Who is online

Users browsing this forum: No registered users and 1 guest