Skip to content

Instantly share code, notes, and snippets.

@youngkin
Created May 18, 2022 20:22
Show Gist options
  • Save youngkin/3c1b4887b999a3fd6e164e664159a77e to your computer and use it in GitHub Desktop.
Save youngkin/3c1b4887b999a3fd6e164e664159a77e to your computer and use it in GitHub Desktop.
func initMax7219() {
writeMax7219(0x09, 0x00) // Decode mode register
writeMax7219(0x0a, 0x03) // medium brightness
// writeMax7219(0x0a,0x0f);// max brightness
writeMax7219(0x0b, 0x07) // Scan limit register
writeMax7219(0x0c, 0x01) // Shutdown register
writeMax7219(0x0f, 0x00) // Display test register, normal mode
// writeMax7219(0x0f,0x01);// Display test register, test mode (light all leds)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment