Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3, 4
HCMAX7219 - LED driver library 
Author Message

Joined: Tue Mar 13, 2018 5:30 pm
Posts: 3
Post Re: HCMAX7219 - LED driver library
Hello,

I am hoping to use two MAX7219 8x8 LED Matrix in a project I am building. I want to be able to pass an integer value between 1 and 100 to the matrix's and for them to display this number.
Would your library, using the command below, be able to provide this functionality do you know?

HCMAX7219.printMatrix(Value, Decimal_Position, Offset)

To add further detail, I am wanting a single digits i.e. 1-9 to appear on the one matrix and then number 10 or more to appear across the two.

Your comments are very much appreciated.

David


Tue Mar 13, 2018 5:39 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 773
Post Re: HCMAX7219 - LED driver library
Yes, if I understand you correctly that will work. Just set the 'offset' column parameter so that your number appears across both displays. If you don't need a decimal point then just use this version:

Code:
HCMAX7219.printMatrix(Value, Offset)

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


Wed Mar 14, 2018 10:00 am
Profile

Joined: Tue Mar 13, 2018 5:30 pm
Posts: 3
Post Re: HCMAX7219 - LED driver library
Hi Andrew,

Thank you for your reply I managed to get this to work. do you know where I can amend the pin allocations. I have looked in the .h file and cannot find them. I know we specify the load pin within the program but, I would like to amend the other two pins.

I also have one further question. I would like to use a 4 digit 7 segment display alongside the two 8x8 led matrix, would I be able to control this using your library or could I use an additional library such as https://github.com/avishorp/TM1637 .

Apologies if this is asking beyond that which you would normally help with.

David


Thu Mar 15, 2018 5:43 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 773
Post Re: HCMAX7219 - LED driver library
Quote:
do you know where I can amend the pin allocations


It uses the hardware SPI interface to output the data to the ICs so I'm afraid the clock and data pins can't be changed.

Quote:
I also have one further question. I would like to use a 4 digit 7 segment display alongside the two 8x8 led matrix, would I be able to control this using your library....


I haven't tested the library in this way but I can't think of any reason why it wouldn't work. Just use the appropriate HCMAX7219.print7Seg() or HCMAX7219.printMatrix() function depending on the type of display your outputting to.

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


Fri Mar 16, 2018 11:13 am
Profile

Joined: Tue Mar 13, 2018 5:30 pm
Posts: 3
Post Re: HCMAX7219 - LED driver library
Hi Andrew,

I have one final question, I have managed to make my program work, however I want to know if it is possible to change the output of a specific number from the library to the 8x8 matrix. Specifically the number 100, as to make it fit across my 2,8x8 matrix. I hope that makes sense.

David


Wed Mar 21, 2018 7:48 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 773
Post Re: HCMAX7219 - LED driver library
I'm not sure if you talking about making the font smaller or making the font proportional so it takes up less columns. In both cases this would require significant modification to the library. For the former you would need to generate a smaller font and modify the library to handle this smaller sized font. Also note that fonts smaller than 8x8 tend to look ugly.

If you mean the latter then you again need to modify the library to handle different width characters and even then without reducing the size of the font a value of 100 still wouldn't fit across two displays.

The only easy options I can think of is to simply scroll the number across the display or, if it's just for the value 100, you could use the HCMAX7219.DisplayBuffer[] function to write your own bitmap for this value directly to the display buffer.

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


Thu Mar 22, 2018 9:42 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 36 posts ]  Go to page Previous  1, 2, 3, 4

Who is online

Users browsing this forum: No registered users and 2 guests


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