Tags:
tag this topic
create new tag
view all tags
---+ The LED matrix shield This shield provides a 8x8 led matrix where each led can be individually be switched on and off and its intensity be controlled. The program uses the mled class which implements the driver for the TM1640 chip by Titan micro. As the README in the mled description says, the TM1640 implements a weird protocol which reminds both of I2C and SPI but is not compatible with either. Fortunately for us somebody else figured out how to control the chip and we simply use his driver. <img alt="ledMatrix.png" src="%ATTACHURL%/ledMatrix.png" title="ledMatrix.png" /> A few example programs are given with the driver and these you can find here: https://github.com/uraich/MicroPython_IoTDemos/tree/master/drivers/ledArray I added a new class _matrix_ on top of _mled_ which implements a method <i>setLevel(value) </i>taking a value (0..64) specifying how many leds should be switched on, starting from the bottom left led. This could be used to show the fill state of a tank: full: most leds on, empty: most leds off. The cayenne version of the program https://github.com/uraich/MicroPython_IoTDemos/blob/master/cayenne/ledArray/cayenneLedMatrix.py subscribes to a Cayenne channel to get the value for the <i>setLevel </i>value. Try to run it with a slider providing values 0..64. https://github.com/uraich/MicroPython_IoTDemos/blob/master/cayenne/ledArray/cayenneLedMatrix.py -- %USERSIG{UliRaich - 2019-03-22}% ---++ Comments %COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
ledMatrix.png
r1
manage
138.2 K
2019-03-22 - 14:34
UliRaich
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2019-05-17
-
UliRaich
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
AFNOG Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback