diff --git a/README.md b/README.md index d4a7536..85f9279 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,20 @@ display.show() Default baud rate of 80Mhz was introducing errors, dropped from 10Mhz and it works consistently. +**Single 8x8 LED Matrix** + +``` +import max7219 +from machine import Pin, SPI +spi = SPI(1, baudrate=10000000, polarity=0, phase=0) +display = max7219.Matrix8x8(spi, Pin(15), 1) +display.text('1', 0, 0, 1) +display.show() +``` + +**Chain of 4x 8x8 LED Matrices** +Where the 4 is drawn on the DIN matrix. + ``` import max7219 from machine import Pin, SPI @@ -78,11 +92,11 @@ spi = SPI(1, baudrate=10000000, polarity=0, phase=0) display = max7219.Matrix8x8(spi, Pin(15), 4) display.brightness(0) display.fill(0) -display.text('1234',0,0,1) +display.text('1234', 0, 0, 1) display.show() ``` -## Connections +## Pin Connections PyBoard | max7219 8x8 LED Matrix ------- | ---------------------- @@ -100,6 +114,14 @@ D7 MOSI (GPIO13) | DIN D8 CS (GPIO15) | CS D5 SCK (GPIO14) | CLK +NodeMCU | max7219 8x8 LED Matrix +---------------- | ---------------------- +VIN | VCC +GND | GND +D7 (GPIO13) | DIN +D8 (GPIO15) | CS +D5 (GPIO14) | CLK + ## Links * Based on [deshipu's max7219.py](https://bitbucket.org/thesheep/micropython-max7219/src)