In order to make the use of Maker LED display more simple, and to have different geometric shapes, texts, images printed on it, it is necessary to use appropriate libraries. We did our best to write the Arduino library which allows all these actions in several lines of code, so that the user can reprogram and display his own text as simple as possible. To function properly, we need the following libraries:
Each of these libraries has its purpose. Adafruit GFX is one of the most popular graphics libraries. The library itself serves to enable generating of different geometric shapes. Therefore, when we e.g. call the function drawCircle(), then Adafruit GFX generates x and y coordinates for each pixel of that circle. However, this data is not yet printed on the display, because the library itself does not know how to communicate with a certain hardware. We need the IS31FL3731 library for that. The homonymous Adafruit library was originally used, but in our case it was too slow, and it was necessary to write the upgraded version. The problem was that the Adafruit Library printed each pixell on the display immediately. Since display uses the I2C communication, which has multiple headers (in our case the I2C address, registry, x and y coordinates and then the intensity of pixell brightness), dana transfer is very slow, and it is possible to see how the display itself is refreshed. What is certainly a better solution, is for the whole image to be generated in RAM (as a buffer), and then everything is sent to the display (IS31FL3731). By calling the clearDisplay () function in the IS31FL3731 library, the entire buffer is cleared, and the display() function prints the entire content of the RAM (buffer).
Maybe someone is wondering why we did not make our GFX library or why we did not take some other one (like uGFX). The reason is simple, and that is the fact that the Adafruit GFX is pretty simple to use, many Makers are well acquainted to it, and it is very popular in the Arduino community.
Currently, our IS31FL3731 library supports everything that the Adafruit GFX library does, so drawing on the display should not be a problem. What may be a problem is the fact that each driver is individual, so if you want to use this library with Maker LED display, it is necessary to enter each image individually, and bear in mind that the images (and shapes) must have their own offset for proper representation on the display. If you want to scroll through a text on the display, then Maker LED Matrix 32 or Maker LED Matrix 64 library is used (depending on the display size), where it is currently enabled to scroll (move the text), scroll the text and the image together, or scroll only the image. It is also possible to print out a stationary text, stationary image, and stationary monochromatic image. You should bear in mind that this library is intended for simple display of the text, therefore if you need the display to be fast, we recommend using the IS31FL3731 library. In order to show the speed of display updating, we upload the results of Maker Display2 benchmark (32x9 pixel), while the ESP8266 is at the frequency of 80 MHz. The results are very satisfactory and show that any screen change action can be done in less than 10ms time, which allows up to 100fps. We do not know for what you could use 100fps on this screen, but it's good to know that there are possibilities! Detailed results are following:
|Clear screen (US)||Drawing (US)||Rendering (US)||Total time (US)|
These results are approximate and can vary from board to board. With Maker Display with 4 drivers (64x9) time will be approximately twice as long. Also, small improvement in the speed of printing can be accomplished if the ESP8266 is set on the tact of 160MHz, but then the energy consumption is larger, and we must look out for it, especially if the display is used on the battery power supply.
Our libraries can be found on GitHub, for Maker Display2 here and for Maker Display4 here. You have an idea how to fix libraries? We are waiting for you on GitHub!