Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
HCDotMatrix Arduino library for 8x8 LED dot matrix module 
Author Message

Joined: Thu Dec 03, 2015 7:27 pm
Posts: 1
Post Re: HCDotMatrix Arduino library for 8x8 LED dot matrix modul
[POST DELETED BY ADMIN] Please see section 5.2 of forum terms and conditions.


Thu Dec 03, 2015 7:28 pm
Profile

Joined: Wed Sep 13, 2017 6:34 am
Posts: 1
Post Re: HCDotMatrix Arduino library for 8x8 LED dot matrix modul
:D This is really awesome for people with only one 8x8 led block and no controller block to plug it in like myself who only now started opening the Arduino world! Thanks so much.
My block configuration was also different but I got it to work by changing row and column numbers etc. It's a pity the manufactures do not print the row and column numbers and don't even put them in sequence...
:?: One question though: I saw in the code that only printable ASCII characters are printable. What would be required to print others, like é (alt+130) or ± (alt+0177) etc.?

Regards


Sun Sep 17, 2017 11:25 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 697
Post Re: HCDotMatrix Arduino library for 8x8 LED dot matrix modul
Thanks. The character set was deliberately limited as it eats up a lot of memory on low power Arduinos such as Unos, Nanos, etc. To get around your problem there are two options that come to mind:

You could extend the character set by editing the font array (Font8x8[][8]) in the HCDotMatrix.h header file (use a proper text editor to do this like Notepad++, don't use the built in Windows Notepad). The font starts on line 87 and ends on line 182. Each row of numbers is an 8x8 bitmap for each ASCII character. To extend the font you can just simply add some more rows to the end of the array. Currently the last row is the bitmap for the ASCII character '~' (ASCII code 126). If you reference the following page you will see table for the standard and extended ASCII characters:

http://www.asciitable.com/

You'll see from the extended table that 'é' is only an additional 4 character after the '~' so you'd just add 4 rows on to the end of the array with each row containing the bitmap information for each additional character after the '~' up to the 'é'.

If you do this there is one additional edit you'll need to do in the HCDotMatrix.cpp file. In this file there is a check to make sure the character being printed in within the range of the font. Just go to line 240 and change this:

Code:
/* ASCII character must be printable ! */
      if(Character < ' ' || Character > '~')



To something like this:

Code:
/* ASCII character must be printable ! */
      if(Character < ' ' || Character > 'é')


Note the last character checked has now been changed from '~' to 'é'



Alternatively if you don't wish to edit the library you can just draw any character yourself using the libraries setLED() function:

_________________
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.


Mon Sep 18, 2017 9:51 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD