I am posting the code (Arduino sketch, of course) I use for driving an 8x32 LED matrix display from Sure Electronics. This code is an adaptation of the one published by Bill Westfield ("WestfW") in the Arduino forum, here. Through the use of a macro definition (#define _16x24_), the same code can be used for either 16x24 or 8x32 display. To generate code for the 8x32 display, simply comment out the above mentioned #define.
This is a re-created short version, since I am too frustrated to re-type everything after I lost the content several times, by pressing Ctrl Z (undo) too many times, it seems.
An observation about Google's Blogspot is that it sucks at displaying source code, compared with the support Wordpress gets for this purpose.
So, I decided to insert my code in a Wordpress blog, here.
If (and when) you use this code, make sure that you connect Arduino pins 6, 7, 8 to their corresponding display pins.
Also, font3.h, included in the sketch, contains the definitions of characters as 8x8 pixels, starting with ascii code 32 (space).
You can download this file here.
The sketch was tested successfully with Arduino IDE 14 on ATmega328. It scrolls "Hello world" from right to left, in a loop (similarly to what happens in with this video).
Name that Ware, November 2024
3 weeks ago
No comments:
Post a Comment