|
1 | 1 | # MicroPython TM1640 LED Matrix |
2 | 2 |
|
3 | | -A MicroPython library for a LED matrix using the TM1740 LED driver. |
| 3 | +A MicroPython library for a LED matrix modules using the TM1740 LED driver. |
4 | 4 |
|
5 | 5 |  |
6 | 6 |
|
7 | | -## Examples |
| 7 | +## Installation |
8 | 8 |
|
9 | | -Copy the file to your device, using ampy, webrepl or compiling and deploying. eg. |
| 9 | +Using mip via mpremote: |
10 | 10 |
|
| 11 | +```bash |
| 12 | +$ mpremote mip install github:mcauser/micropython-tm1640 |
11 | 13 | ``` |
12 | | -$ ampy put tm1640.py |
| 14 | + |
| 15 | +Using mip directly on a WiFi capable board: |
| 16 | + |
| 17 | +```python |
| 18 | +>>> import mip |
| 19 | +>>> mip.install("github:mcauser/micropython-tm1640") |
13 | 20 | ``` |
14 | 21 |
|
| 22 | +Manual installation: |
| 23 | + |
| 24 | +Copy `tm1640.py` to the root directory of your device. |
| 25 | + |
| 26 | +## Examples |
| 27 | + |
15 | 28 | **Basic usage** |
16 | 29 |
|
17 | 30 | ```python |
@@ -49,29 +62,31 @@ tm.write_int(0x55aa55aa55aa55aa) |
49 | 62 |
|
50 | 63 | For more detailed examples, see  |
51 | 64 |
|
52 | | -## Parts |
| 65 | +## Modules |
53 | 66 |
|
54 | | -* [WeMos D1 Mini](https://www.aliexpress.com/store/product/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/1331105_32529101036.html) $3.50 USD |
55 | | -* [Clone DIY More WeMos Matrix LED Shield](https://www.aliexpress.com/item/Matrix-LED-Shield-V1-0-0-For-WEMOS-D1-Mini-Digital-Signal-Output-Module-8-X/32821752799.html) $1.35 USD |
56 | | -* [Dual Base for WeMos D1 Mini](https://www.aliexpress.com/store/product/Dual-Base-for-WeMos-D1-mini/1331105_32642733925.html) $1.00 USD |
| 67 | +* [WeMos D1 Mini](https://www.aliexpress.com/item/32529101036.html) |
| 68 | +* [WeMos Matrix LED Shield](https://www.aliexpress.com/item/32812932291.html) |
| 69 | +* [DIY More MatrixLED Shield for D1 Mini](https://www.aliexpress.com/item/32821752799.html) |
| 70 | +* [Dual Base for WeMos D1 Mini](https://www.aliexpress.com/item/32642733925.html) |
57 | 71 |
|
58 | 72 | ## Connections |
59 | 73 |
|
60 | | -WeMos D1 Mini | TM1640 LED Matrix |
61 | | -------------- | ----------------- |
62 | | -D5 (GPIO14) | CLK |
63 | | -D7 (GPIO13) | DIO |
64 | | -3V3 (or 5V) | VCC |
65 | | -G | GND |
| 74 | +`CLK` and `DIO` are bit-banged. You can use any GPIO. |
| 75 | + |
| 76 | +TM1640 LED Matrix | WeMos D1 Mini |
| 77 | +----------------- | ------------- |
| 78 | +CLK | D5 (GPIO14) |
| 79 | +DIO | D7 (GPIO13) |
| 80 | +VCC | 3V3/5V |
| 81 | +GND | G |
66 | 82 |
|
67 | 83 | ## Links |
68 | 84 |
|
69 | | -* [WeMos D1 Mini](https://wiki.wemos.cc/products:d1:d1_mini) |
| 85 | +* [WeMos D1 Mini](https://www.wemos.cc/en/latest/d1/index.html) |
70 | 86 | * [micropython.org](http://micropython.org) |
71 | 87 | * [TM1640 datasheet](http://www.titanmic.com/pic/other/2014-11-20-15-36-028.pdf) |
72 | 88 | * [Titan Micro TM1640 product page](http://www.titanmec.com/index.php/en/project/view/id/305.html) |
73 | 89 | * [MicroPython framebuf](http://docs.micropython.org/en/latest/esp8266/library/framebuf.html) |
74 | | -* [Adafruit Ampy](https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy) |
75 | 90 |
|
76 | 91 | ## License |
77 | 92 |
|
|
0 commit comments