Modified DMD library

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]

Modified DMD library

Postby debenham » Tue Jan 10, 2012 3:34 am

I just bought a DMD and was playing around with the included library.
It was very nice but I thought I could add a few features ;)
The main change is replacing the drawCharacter_* functions with a generic drawChar function.
There is now the ability to load a font via selectFont (three fonts included, Arial_14, Arial_bold_14 and System5x7)
After calling that function any text written will be output in that font.

I have also added a drawString function that allows you to write a full string at once
Finally I have added scrolling text (AKA marquee) via the 'drawMarquee' and 'stepMarquee' functions
By using this with the Arial_bold_14 font it makes quite a good notice display.

I have updated the examples included in the original library to use these new functions.
This is just a first go at adding some features so let me know if anyone has any suggestions for extra stuff :)

It can be downloaded from https://github.com/cjd/DMD

Edit: Library now supports multiple gray levels, multiple buffers and screen transistions
See http://www.adebenham.com/2012/04/dmd-sc ... ansitions/
Last edited by debenham on Thu Apr 26, 2012 4:33 am, edited 1 time in total.
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Postby jonoxer » Wed Jan 11, 2012 10:58 am

That's brilliant! Thanks for pitching in: this is exactly what we hoped would happen when Marc did the first version of the library and we released the hardware. Unfortunately we don't have the resources to put a huge amount of time into it, but with a few people collaborating it can progress rapidly.

Because the DMD has received so much attention I've just created a GitHub repo to make it easier to track issues and patches. @debenham, do you have a GitHub account and experience with Git so you could submit your changes as a pull request or a patchset? If you don't that's fine of course, let me know and I'll merge your updated version in.

https://github.com/freetronics/DMD

--
Jon
User avatar
jonoxer
Freetronics Staff
Freetronics Staff
 
Posts: 287
Joined: Sat Oct 15, 2011 11:31 am

Re: Modified DMD library

Postby debenham » Thu Jan 12, 2012 12:19 am

I hadn't used github before - but now have ;)
I have setup a fork of the repo, made my changes and made the pull request
https://github.com/freetronics/DMD/pull/1
The change is a bit larger than it needs to be since it included my re-formating changes (not essential but made it easier to follow the code)
Let me know if I didn't do it right - I haven't used github previously (but it doesn't seem that different to sccs, cvs, bzr or hg which I have used before)

Next step - find a second DMD and get that working :)
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Postby jonoxer » Thu Jan 12, 2012 12:31 am

Hey Chris, thanks for setting up the pull request.

By the way, when I saw your name I puzzled over it for a moment because I *knew* it was familiar, but couldn't remember where from, then it suddenly came back to me: bashpodder and Lyricue! I used to use bashpodder on my desktop machine (no longer since I pull podcasts straight onto an Android phone now) and a few years ago I set up Lyricue at South Croydon Anglican Church here in Melbourne. I vaguely recall doing some Debian packaging or something for it at the time.

Anyway, thanks for your help with the DMD library, and keep your eyes open for a PM regarding that second panel ;-)
--
Jon
User avatar
jonoxer
Freetronics Staff
Freetronics Staff
 
Posts: 287
Joined: Sat Oct 15, 2011 11:31 am

Re: Modified DMD library

Postby debenham » Thu Jan 12, 2012 5:09 am

I have just committed to my git clone (https://github.com/cjd/DMD ) a 'potential' support for multiple panels.
It doesn't break on a single panel but I can't test multi-panels so if someone else is willing to give it a try that would be great.
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Postby marc » Thu Jan 12, 2012 10:27 pm

Hi Chris,
Thanks this is awesome :)
Attached is a 'quick tweak' to the library, support for 2 panels across is tested and working!
This is just a quick one to get the revision back out there and back to you fast, I've not gone through checked and reworked the panel size/width/height values into a cleaner layout, fyi, just added in the panel width scaling to the scan and modified some routines to allow for the DisplaysWide.

We have some craziness here this week and next week for the Mini Maker Faire then the LCA conference next week, normally I would set up to push back to git etc but today it's quicker for me to drop a zip file back so here it is.

Cheers,
Marc

PS there's a modified example called "dmd_demo_2_panel_testing" in there for now, running 2 displays across with the text and scrolling text.
Attachments
cjdDMDb.zip
(22.5 KiB) Downloaded 398 times
marc
Freetronics Staff
Freetronics Staff
 
Posts: 16
Joined: Sat Oct 15, 2011 12:54 pm

Re: Modified DMD library

Postby debenham » Thu Jan 12, 2012 10:51 pm

Thanks for that - I was putting the same image to all displays :P
I've updated my git with the changes (and a few other small adjustments so it should work for more than two displays as well)
I'll do a new pull request shortly
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Postby debenham » Thu Jan 12, 2012 10:59 pm

Note: you can create new fonts using GLCDFontCreator2
That can be grabbed from
https://code.google.com/p/glcd-arduino/ ... p&can=2&q=
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Postby debenham » Tue Jan 17, 2012 1:35 am

I have made some more changes so that the test patterns now handle multiple displays.
I've also re-worked some of the string/character handling and now outputting a string is about 3 times faster :)
Changes have been committed to git - https://github.com/cjd/DMD
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Postby debenham » Wed Jan 18, 2012 1:35 am

I just fixed up the demo code to handle multiple displays better - just change the DISPLAYS_ACROSS and DISPLAYS_DOWN defines at the top to whatever is needed

I've just uploaded a video of the demo to youtube as http://youtu.be/5DLmWrpV-3M
debenham
 
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Next

Return to Dot Matrix Display

Who is online

Users browsing this forum: No registered users and 1 guest