Richard Hull and his team have already built an LED dot matrix driver based on IC MAX7219. You can download it from https://github.com/rm-hull/max7219. This library also supports cascading several dot matrix display modules. This means that we can cascade several LED dot matrix modules by connecting DOUT to DIN among these modules. You will learn how to cascade LED dot matrix modules in the last section of this chapter.
The library needs the SPI library to run the LED dot matrix display module. In the next section, I'm going to explain how to activate SPI on a Raspberry Pi board.
By default, Raspberry Pi disables the SPI port, so if we want to access the SPI port, we must activate it via raspi-config
. Type the following command:
sudo raspi-config
You should get a raspi-config
form. Select Advanced Options. Then, you should select A6 SPI, as shown in the following screenshot. Confirm to enable and load SPI onto Raspberry Pi. The...