8/28/2023 0 Comments Arduino led matrix driverI then got busy with other projects and hobbies. This was pretty major accomplishment for me since I wrote a generic C++ library that could allocate an array of any size (it supports anything, not just 8x8), and do all the work in the background in an ISR. This soon allowed me to display the smiley face bitmap from the Adafruit LED Backpack library. As a result, I wrote an ISR (interrupt routine) to rrefresh the lines, like an old cathodic raw tube, in the background, while leaving the main loop for programming what you want to do and display. Many examples do this in the main arduino loop, but I wanted to use Adafruit's excellent Adafruit-GFX library. Then, you go to the next line, and continue. Like other matrices you have to disable all the lines, set the rows you'd like for each color, and then turn on the common ground to illuminate those pixels for a little while. My bycolor matrix has common cathode, green and red on the 2 anodes. Those didn't come with any driver chip, so that gave me an excuse to program my own code to do line scanning and refresh like many examples you find on the net. Then, I also happened to have some raw LED matrices a dual color one and a triple color one ordered from china, equivalent to these two: and. For instance the Adafruit LED backpack is super easy to use, but you cannot control each color to mix different shades between them. Unfortunately, you can't do color mixes with different intensities for each color. Those are great since you program the columns and rows, and they do the line by line scan and refresh for you. Many LED matrices come with a MAX7219 driver chip or equivalent. Code download: Multi Color PWM LED Matrix Driver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |