Matrix Portal: 127 User-Controlled Effects Plus 389 Controls

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
eddtrettel
 
Posts: 19
Joined: Thu Apr 04, 2019 12:22 am

Matrix Portal: 127 User-Controlled Effects Plus 389 Controls

Post by eddtrettel »

Hi,

I've created the attached code.py that uses BLE to talk to your phone via the Adafruit Bluefruit Connect app.

The Matrix Portal is connected to a 64x32 LED matrix.

You control how the 127 different LED effects are shown by the BLE app. There are 389 different controls for the effects, which you also control from your phone. As delivered below all of these are set up as defaults and it will run right-out-of-the-box.

The attached documentation file that I created for this effort is from Microsoft Word, saved as a PDF. The Table of Contents is "linkable"; that is, you can click on an item in the TOC and it will take you there.

The effects are in these categories:
• Circles
• Collage
• Dots (individual LEDs)
• Lines
• Marquee (displays text you choose)
• Polygons
• Rectangles
• Rounded Rectangles (corners are rounded)
• Squares
• Rounded Squares (corners are rounded)
• Triangles

The controls determine duration, repetition, color, layering, etc.

Notes:
1.) I noticed that the BLE was unstable at certain firmware versions. It's very stable on what I'm using now, which is esp.firmware_version) bytearray(b'1.7.4\x00'). You may want to upgrade/downgrade your firmware if you have problems with BLE failing.

2.) This topic posting method only allows for three file attachments. Here are a few more:

A.) You will need to make a copy of the times_durations_dictionary.txt file attached as "times_durations_dictionary - Copy.txt" (exact name required) in the root directory of your Matrix Portal. This is used in case the primary one becomes corrupt.

B.) The boot.py file looks like this:
import storage
storage.remount("/", False)
# readonly set to False
# Only CircuitPython can write to the drive.

C.) When you want to edit the file from your computer you'll need to suspend the boot.py file by renaming it so one that's not recognized by CircuitPython. You can do that via the REPL interface on your computer. The text is:
import os
os.rename("/boot.py", "/boot.bak")
os.sync()

3.) I am using Adafruit CircuitPython 7.0.0-alpha.3 on 2021-06-03; Adafruit Matrix Portal M4 with samd51j19

4.) The "lib" needs these libraries:
adafruit_airlift
adafruit_ble
adafruit_display_shapes
adafruit_display_text
adafruit_matrixportal

Have fun with this. And obviously one does not need a canvas to display. Only the Matrix Portal and a 64x32 LED matrix.

Best regards,
E.T.
Attachments
times_durations_dictionary.txt
Required file for the root directory
(5.69 KiB) Downloaded 33 times
code.py
Program
(62.03 KiB) Downloaded 37 times
Canvas-Diffused LED Matrix Display User Guide 002.pdf
Documentation
(833.06 KiB) Downloaded 54 times

Locked
Please be positive and constructive with your questions and comments.

Return to “AdaBox! Show us what you made!”