Skip to content

C# class library which allows easy manipulation of 7-segment (and similar) LED displays, driven by the MAX7219 chip. Ideal for projects deployed to Raspberry Pi and similar platforms.

License

Notifications You must be signed in to change notification settings

rjbfoster/MAX7219Sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAX7219 Sharp

This is a class library which facilitates easy manipulation of LED displays driven by the MAX7219 chip over a Serial Peripheral interface (SPI). The library is designed to be lightweight and is targeted at .NET 7, utilizing Microsoft's System.Device.Spi library to interface with the device.

Purpose

The purpose of this program is to enable the quick and easy usage of off-the-shelf MAX7129 displays, primarily on platforms such as the Raspberry Pi.

Usage

Download and install the package using NuGet:

dotnet add package MAX7219Sharp --version 1.0.0

You can also use the Package Manager Console:

PM> NuGet\Install-Package MAX7219Sharp -Version 1.0.0

Wiring Example

MAX7219 Pin RPi Pin Description
VCC 2 (+5V) 5V power supply
GND 6 (GND) Ground
DIN 19 (MOSI) Data in
CS 24 (SPI CE0) Chip Select 0
CLK 23 (SPI CLK) Clock

Code Example

A simple example of how to use the library is shown below:

using MAX7219Sharp;

Console.WriteLine("Writing HELLO to display");
var device = new MAX7219();

device.Write("HELLO");

Thread.Sleep(1000);

device.ClearDisplay();

Console.WriteLine("Press any key to exit");
Console.ReadKey();

Please see the DisplayDemo project for a more in-depth example, and/or to provide a starting point for your own code.

About

C# class library which allows easy manipulation of 7-segment (and similar) LED displays, driven by the MAX7219 chip. Ideal for projects deployed to Raspberry Pi and similar platforms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages