APPENDIX D

image

Class MAX7219

This appendix documents the class MAX7219 to facilitate communication with the chip with the same name and it is useful for those wanting to:

  • Working with the MAX7219 (or MAX7221) to control a display

  • To enable/disable the display

  • To display the test pattern

  • To configure the number of digits and decode mode

  • To configure the intensity of the display

  • To drive a display

Include File

With the default build and install PREFIX=/usr/local, your installed librpi2 header files should be located in /usr/local/include. In your program use:

#include <librpi2/max7219.hpp>

If necessary, add the compiler option -I/usr/local/include ...

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.