Discussion:
New display: LEDMATRIX
(too old to reply)
Till Harbaum
2006-08-05 21:30:02 UTC
Permalink
Hi,

i had two spare hours, my old LED matrix display (for which i have never
really written an application) and lcd4linux. So i wrote a driver for what
probably is the biggest (roughly 60 x 25 cm) and power hungry
(20A @ 5V) display available to lcd4linux.

See the driver here:
https://ssl.bulix.org/projects/lcd4linux/wiki/LEDMatrix

and if you want to build one yourself, just follow these
instructions:
http://www.harbaum.org/till/ledmatrix/

Ciao,
Till
--
Dr.Ing. Till Harbaum <***@harbaum.org>
http://www.harbaum.org/till
Ernst Bachmann
2006-08-08 18:09:51 UTC
Permalink
Hi,
Post by Till Harbaum
Hi,
i had two spare hours,
Same here ;)
Post by Till Harbaum
my old LED matrix display (for which i have never
really written an application) and lcd4linux. So i wrote a driver for what
probably is the biggest (roughly 60 x 25 cm) and power hungry
Now, after your driver for the biggest Display, I have a driver for the most
simple (only 4 LEDs on average), but probably the most common display:

A lcd4linux driver to control the port indicator LEDs on common USB Hubs.

The driver is pretty straightforward: you specify the vendor/product ID for
your hub in config, it then searches for the device, asks if it has
controllable LEDS, and how many, and then initializes them as GPOs for your
blinking pleasure.

The per-port GPOs accept the following values:
0 : Automatic color (display link state etc)
1 : Amber
2 : Green
3 : Off

Unfortunatly, my HUBs are all green-only, so I couldn't test "amber".

The normal function of the HUB isn't interrupted while the driver runs.

An example config file is attached.

Have fun with it,
/Ernst
Michael Reinelt
2006-08-08 19:40:33 UTC
Permalink
Hi all,
Post by Ernst Bachmann
Now, after your driver for the biggest Display, I have a driver for the most
A lcd4linux driver to control the port indicator LEDs on common USB Hubs.
Well, this is probably the funniest driver we'll ever get with
lcd4linux! Unfortunately, I don't own any USB hub, but I really like the
idea!

I think it shows the power and flexibility of lcd4linux, because
integrating such a driver (which has *absolutely nothing* to do with
LCD's or displays) was that easy and required exactly *no* changes to
the internal framework. Amazing!

Committed to CVS. Thanks a bunch!

btw, Ernst, would you care writing some docs in the wiki? Especially a
photo would be great...


bye, Michael
--
Michael Reinelt <***@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
Till Harbaum
2006-08-08 20:41:33 UTC
Permalink
Hi,

i have added RGB support to the LEDMATRIX display. Furthermore i made a change
to the widget item which you might not like and which can easily be removed
again: I added the parameter "extracolor" which can be used to specify a
third color (besides foregound and background). This color is meant to be
used for widget specific "special" purposes. I have changed the bar widget
to use this color for the bordert (if style is set to hollow).

You can just ignore the new color and everything will look like it did before.
But if you use it you can change the border color of the bar.

Do you think this is a good idea?

Till
--
Dr.Ing. Till Harbaum <***@harbaum.org>
http://www.harbaum.org/till
Michael Reinelt
2006-08-08 21:14:09 UTC
Permalink
Hi Till,
Post by Till Harbaum
i have added RGB support to the LEDMATRIX display.
Great! Pictures! I wanna see pictures!

( I showed your pictures to my girlfriend. she said "really nice, but...
YOU'RE NOT GOING TO BUY THIS". Maybe you're familiar with this special
kind of timbre :-)
Post by Till Harbaum
Furthermore i made a change
to the widget item which you might not like and which can easily be removed
again: I added the parameter "extracolor" which can be used to specify a
third color (besides foregound and background). This color is meant to be
used for widget specific "special" purposes. I have changed the bar widget
to use this color for the bordert (if style is set to hollow).
You can just ignore the new color and everything will look like it did before.
But if you use it you can change the border color of the bar.
Do you think this is a good idea?
I think it's a very good idea. I didn't look at the code now, but this
is a special attribute for the bar widget, isn't it? So why not call it
"border color" or something?

Due to the fact that your display seems to be the first multi-color
display available for lcd4linux, we didn't think about colors too much
in the past. Hopefully this will change in the future...


bye, Michael
--
Michael Reinelt <***@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
Till Harbaum
2006-08-09 05:33:00 UTC
Permalink
Hi,

i'll add screenshots. But before i'll add a bold 8*6 font ... the more leds are being used, the better.

Currently the extra color is part of the generic widget. But you are right. This should be bar specific. I'll change that this evening.

And my girlfriend likes the display, she's a geek, too.

Till
--
Dr.-Ing. Till Harbaum

-----Ursprüngliche Nachricht-----

Von: Michael Reinelt <***@eunet.at>
Betr.:Re: [Lcd4linux-devel] New display: LEDMATRIX
Datum: Di 8. Aug 2006 23:14
Größe: 1K
An: Till Harbaum <***@harbaum.org>
Cc: lcd4linux-***@lists.sourceforge.net

Hi Till,
Post by Till Harbaum
i have added RGB support to the LEDMATRIX display.
Great! Pictures! I wanna see pictures!

( I showed your pictures to my girlfriend. she said "really nice, but...
YOU'RE NOT GOING TO BUY THIS". Maybe you're familiar with this special
kind of timbre :-)
Post by Till Harbaum
Furthermore i made a change
to the widget item which you might not like and which can easily be removed
again: I added the parameter "extracolor" which can be used to specify a
third color (besides foregound and background). This color is meant to be
used for widget specific "special" purposes. I have changed the bar widget
to use this color for the bordert (if style is set to hollow).
You can just ignore the new color and everything will look like it did before.
But if you use it you can change the border color of the bar.
Do you think this is a good idea?
I think it's a very good idea. I didn't look at the code now, but this
is a special attribute for the bar widget, isn't it? So why not call it
"border color" or something?

Due to the fact that your display seems to be the first multi-color
display available for lcd4linux, we didn't think about colors too much
in the past. Hopefully this will change in the future...


bye, Michael
--
Michael Reinelt <***@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
Till Harbaum
2006-08-09 17:37:38 UTC
Permalink
Hi,

i have changed the generic widget extra color into a bar specfic barcolor0 und
barcolor1 which can be used to set the colors of the both bars seperately (see
the screenshot at http://ssl.bulix.org/projects/lcd4linux/wiki/LEDMatrix).

I have additionally added support for a bold 6x8 font'which you can see in
that screenshot as well. I just love to have more LEDs being switched on ...

BTW: The small thing on top is a regular 4*20 lcd.

Till
--
Dr.-Ing. Till Harbaum
Michael Reinelt
2006-08-13 11:52:04 UTC
Permalink
Hi Till, list,
Post by Till Harbaum
i have changed the generic widget extra color into a bar specfic barcolor0 und
barcolor1 which can be used to set the colors of the both bars seperately (see
the screenshot at http://ssl.bulix.org/projects/lcd4linux/wiki/LEDMatrix).
Great Idea!

A further improvement comes to my mind: give different areas of the bar
different colors? (say: 0-50% green, 51-80% yellow, 81-100% red)

I have no idea how to implement this in a clean (and understandable :-)
way...

maybe a bar could have a 'background image', and the bar drawing
function just does alpha blending?
Post by Till Harbaum
I have additionally added support for a bold 6x8 font'which you can see in
that screenshot as well. I just love to have more LEDs being switched on ...
Another great idea, which I already improved: I removed all the BOLD
stuff (sorry, Till :-) an re-added this as a text-widget specific
attribute. So you can add a "style 'bold'" attribute to every text
widget. This attribute is dynamically evaluated, so you can even change
between bold and normal font during operation (there's an example in the
lcd4linux.conf.sample from current CVS, using the test::onoff() plugin.
Have a look at the CPU widget)

While implementing this, I found the current widget attribute handling
to be quite complex. So I tried to hide some of the complexity a bit in
the new 'dynamic property' functions. Some properties of the text widget
(namely prefix postfix and style) use this new stuff. Looks much cleaner
to me....


btw, there's a 'truetype' widget for graphic displays on my wishlist....


bye, Michael
--
Michael Reinelt <***@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
Till Harbaum
2006-08-13 13:27:34 UTC
Permalink
Hi,
Post by Michael Reinelt
A further improvement comes to my mind: give different areas of the bar
different colors? (say: 0-50% green, 51-80% yellow, 81-100% red)
Hmm ... I'll think about that ...
Post by Michael Reinelt
Another great idea, which I already improved: I removed all the BOLD
stuff (sorry, Till :-) an re-added this as a text-widget specific
Yes, i am currently working on a new plugin and i am seeing patches
coming in at quite a high rate ... but fortunately cvs/patch are able
to manage this ...
Post by Michael Reinelt
btw, there's a 'truetype' widget for graphic displays on my wishlist....
Cool ...

I am currently writing a kvv plugin. KVV is the "Karlsruher Verkehrsverbund"
and you can get access via web interface to the train/bus timings usually
displayed at the stations (things like "Linie 3, Karlsruhe Hbf. in 5
Minuten"). I am extracting this information and use it to reconstruct
this again for use on my LED display. You can then specify the interesting
station in lcd4linux.conf and have the next 4 trains displayed in real
time just like the real display at the station does.

Now my question: My plugin currently returns single strings for
each line (like kvv(0) will return the train that will arrive next,
kvv(1) the train that will arive second etc ect). Can i somehow include
color information in this? I'd like to specify an additional time
(the time it takes me to get to the station) and then have the trains
displayed in red (if i can't reach them anymore) in yellow (if i have
to hurry) and green (if i'll reach them easily). How would this be done?

Till
--
Dr.Ing. Till Harbaum <***@harbaum.org>
http://www.harbaum.org/till
Michael Reinelt
2006-08-13 13:48:24 UTC
Permalink
Hi Till,
Post by Till Harbaum
I am currently writing a kvv plugin. KVV is the "Karlsruher Verkehrsverbund"
and you can get access via web interface to the train/bus timings usually
displayed at the stations (things like "Linie 3, Karlsruhe Hbf. in 5
Minuten"). I am extracting this information and use it to reconstruct
this again for use on my LED display. You can then specify the interesting
station in lcd4linux.conf and have the next 4 trains displayed in real
time just like the real display at the station does.
Well, *now* I understand what your huge display is for :-)

This sounds very cool. *Please* add a picture to the wiki when it's
finished...
Post by Till Harbaum
Now my question: My plugin currently returns single strings for
each line (like kvv(0) will return the train that will arrive next,
kvv(1) the train that will arive second etc ect). Can i somehow include
color information in this? I'd like to specify an additional time
(the time it takes me to get to the station) and then have the trains
displayed in red (if i can't reach them anymore) in yellow (if i have
to hurry) and green (if i'll reach them easily). How would this be done?
First, are you writing the plugin in an asynchronous way? LCD4Linux
doesn't like delays in plugins very much; that's why you should use
threads when a plugin may take some time to get the needed information.
Take a look at the 'exec' plugin for how to handle that...

Now for your question: I'd use two different funtions in the plugin: One
for the "name" of the next train, one for the departure time (or for
'minutes until departure' or whatever you'll find handy here).

IIRC the color attributes of the text widget should re-evaluate on every
update (if not, I'm gonna change them; should be easy with the new
'dynamic properties').

I think the config could look like this

Widget Train1 {
expression KVV:name(0)
foreground KVV:time(0) < 2 ? FF0000 : KVV:time(0) < 5 ? FFFF00 : 00FF00
}

you got the point?



bye, Michael
--
Michael Reinelt <***@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
Till Harbaum
2006-08-13 15:19:26 UTC
Permalink
Hi,
Post by Michael Reinelt
Well, *now* I understand what your huge display is for :-)
In fact i wanted to do this since i started to build the display.
Post by Michael Reinelt
This sounds very cool. *Please* add a picture to the wiki when it's
finished...
Sure.
Post by Michael Reinelt
I think the config could look like this
Ok, got it, thanks.

Till
--
Dr.Ing. Till Harbaum <***@harbaum.org>
http://www.harbaum.org/till
Till Harbaum
2006-08-13 18:21:09 UTC
Permalink
Hi,

lcd4linux now has a KVV plugin. It is inly useful to you if you live
in Karlsruhe, Germany. But if you do you can now display the
train departure times of any given train station in realtime just
as displayed on the real displays at the stations.

Till
--
Dr.Ing. Till Harbaum <***@harbaum.org>
http://www.harbaum.org/till
Luis Correia
2006-08-16 20:36:16 UTC
Permalink
Post by Till Harbaum
Hi,
lcd4linux now has a KVV plugin. It is inly useful to you if you live
in Karlsruhe, Germany. But if you do you can now display the
train departure times of any given train station in realtime just
as displayed on the real displays at the stations.
Till
Hi!

I've checked out CVS but it has some errors... maybe I done something
wrong here?

drv_LCD2USB.o: In function `drv_L2U_timer':
/opt/buildtool/source/lcd4linux/lcd4linux-0.10.0/drv_LCD2USB.c:476:
undefined reference to `drv_generic_keypad_press'
drv_LCD2USB.o: In function `drv_L2U_init':
/opt/buildtool/source/lcd4linux/lcd4linux-0.10.0/drv_LCD2USB.c:632:
undefined reference to `drv_generic_keypad_real_press'
/opt/buildtool/source/lcd4linux/lcd4linux-0.10.0/drv_LCD2USB.c:660:
undefined reference to `drv_generic_keypad_init'
drv_LCD2USB.o: In function `drv_L2U_quit':
/opt/buildtool/source/lcd4linux/lcd4linux-0.10.0/drv_LCD2USB.c:693:
undefined reference to `drv_generic_keypad_quit'
plugin_kvv.o: In function `plugin_exit_kvv':
/opt/buildtool/source/lcd4linux/lcd4linux-0.10.0/plugin_kvv.c:780:
undefined reference to `thread_destroy'
collect2: ld returned 1 exit status

These functions are missing:

drv_LCD2USB.c:
476: undefined reference to `drv_generic_keypad_press'
632: undefined reference to `drv_generic_keypad_real_press'
660: undefined reference to `drv_generic_keypad_init'
693: undefined reference to `drv_generic_keypad_quit'
780: undefined reference to `thread_destroy'

Since I really want to test my LCD2USB today, i'll just comment out
these offending functions from my local copy.

Ah, as a reminder, i'm cross-compiling it for uClibc.

Luis
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Michael Reinelt
2006-08-17 05:08:02 UTC
Permalink
Post by Luis Correia
476: undefined reference to `drv_generic_keypad_press'
632: undefined reference to `drv_generic_keypad_real_press'
660: undefined reference to `drv_generic_keypad_init'
693: undefined reference to `drv_generic_keypad_quit'
780: undefined reference to `thread_destroy'
Thanks for the hint. A reference to drv_generic_keypad was missing in
drivers.m4 (I should run the smoketest.sh more often :-)

Fixed in CVS.

bye, Michael
--
Michael Reinelt <***@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
Loading...