Skip to content

Commit 49b8b42

Browse files
committed
updating content
1 parent f48cff9 commit 49b8b42

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

docs/displays/graph/01-intro.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ If you don't see a return value of "60" or similar, then you need to check your
4141

4242
## References
4343

44-
* [Wokwi web-based simulator of OLED display](https://wokwi.com/projects/359558101922696193)
44+
* [Wokwi web-based simulator of OLED display](https://wokwi.com/projects/359558101922696193)
45+
* [Mike Causer's Awesome MicroPython Display Drivers](https://github.com/mcauser/awesome-micropython?tab=readme-ov-file#display)

docs/displays/non-graph/04-8x8-led-matrix.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,53 @@
1-
# 8x8 LED Matrix
1+
# MAX7219 8x8 LED Matrix
22

3-
This is a low-cost and easy-to-program device that is perfect for small projects.
3+
![MAX7219 ](../../img/max7219-8x8-led.png)
4+
![MAX7219 ](../../img/led-matrix-display-back.png)
5+
6+
This is a low-cost ($3) and easy-to-program device that is perfect for small projects that don't
7+
need a full graphical display. You will be surprised at how creative our students are with
8+
just an 8x8 display!
9+
10+
[eBay Search for "MAX7219 8x8 matrix"](https://www.ebay.com/sch/i.html?_nkw=MAX7219+8x8+matrix)
11+
12+
The device comes with five connectors:
13+
14+
1. Power (VCC)
15+
2. Ground (GND)
16+
3. Clock (SCK)
17+
4. Data (MOSI)
18+
5. Chip Select (CS)
19+
20+
We can communicate with the device using the standard SPI interface. There is also
21+
an 8x8 driver supplied by [Mike Causer](https://github.com/mcauser/micropython-max7219) Here is an excerpt of how we
22+
configured the driver to use a single display:
23+
24+
```py
25+
from machine import SPI, Pin
26+
import max7219
27+
from utime import sleep
28+
CLOCK_PIN = 2
29+
DATA_PIN = 3
30+
CS_PIN = 4
31+
spi0=SPI(0,baudrate=10000000, polarity=1, phase=0, sck=Pin(CLOCK_PIN), mosi=Pin(DATA_PIN))
32+
cs = Pin(CS_PIN, Pin.OUT)
33+
matrix = max7219.Matrix8x8(spi0, cs , 1)
34+
# display text a x=0, y=0 and state = 1 (on)
35+
matrix.text('1234', 0, 0, 1)
36+
matrix.show()
37+
```
38+
39+
You can change the last parameter from "1" to "4" if you have 4 displays wired together:
40+
41+
```py
42+
import max7219
43+
from machine import Pin, SPI
44+
spi = SPI(1)
45+
matrix = max7219.Matrix8x8(spi0, cs , 4)
46+
display.text('1234',0,0,1)
47+
display.show()
48+
```
49+
50+
The displays can also be "cascaded"
451

552
## Basic Program
653

docs/img/led-matrix-display-back.png

523 KB
Loading

docs/img/max7219-8x8-led.png

319 KB
Loading

0 commit comments

Comments
 (0)