Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded documentation for ESP8266/NodeMCU #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,32 @@ 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
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
------- | ----------------------
Expand All @@ -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)
Expand Down