-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong order of displayed text #5
Comments
Could you please elaborate? How did you wire and what kind of module(s) did you use? |
Yes. Thanks for the answer. With Wemos D1 mini (ESP8266): Btw, do you know how to use a different, denser font? I´m programming a clock and the four digits plus the colon does not fit width. |
I had this problem as well when using multiple such Max7219 8x8 LED matrix display modules soldered end to end. In my code, I assemble the info I want to display into a string variable and then call a reverse() function just before I display it which will reverse the order of all the characters in the string and then display the string resulting in all the characters in proper order. Here is my reverse() function: And here's some code to show how to use the reverse() function: I also have a demo program worth a look. It demonstrates how to scroll a longer text message across the 4-digit display from right to left showing 4 characters at a time. I'll attach that file to this message. This demo program uses a slightly modified version of the max7219 file that includes a clear() method in the Matrix8x8 class. I call this version "max7219a". Here is a copy of that file: For all these files, be sure to rename the file, removing the final four characters (".txt") from the file name. Have fun with it. |
With regards to your question: "Btw, do you know how to use a different, denser font?", in the Arduino C/C++ arena, there was a guy doing a 7x5 font with Max7219 8x8 LED matrix display modules. He was using displays with large numbers of these modules and was complaining of speed issues, so I assume doing the same thing in MicroPython is going to be even worse because things are generally slower in MicroPython as compared with C/C++ (even though we are using more powerful processors). However, if your project just has 4 of these 8x8 LED matrix display modules, MicroPython might be fast enough to get reasonable results. It would be a cool feature to add to Mike Causer's max7219.py library module, but will likely involve a lot of work with translating C/C++ code into MicroPython and what not... Here are a couple of links on the topic done with Arduino C/C++ which is a good programming option for ESP8266 and ESP32 MCU boards: https://forum.arduino.cc/index.php?topic=381530.0 Looks like too big of a job for me! I'd suggest trying it with Arduino C/C++ with the ESP8266 or ESP32 Core installed and if you can get that working, maybe look at writing or translating it into a MicroPython version. |
Does this help? |
Tried out the example for the wemos d1. But the displayed text has the wrong order.
How to reverse the order?
The text was updated successfully, but these errors were encountered: