APPENDIX E

image

Class Matrix

This appendix documents the Matrix class as used in the project in Chapter 3. This class can be used to drive an LED matrix, as shown in Chapter 3, for example:

  • When working with the MAX7219 to display a bar graph in an LED matrix

  • To control a CPU meter using PWM

  • To display a Pi symbol on the matrix

This class is very simple compared with that for GPIO and MAX7219. What you will notice immediately in the sections that follow is that the Matrix class inherits from the MAX7219 class. By doing so, it supports all the methods provided by the MAX7219 but adds a few more related to the Matrix operation.

Include File

With the ...

Get Exploring the Raspberry Pi 2 with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.