-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Adafruit MatrixPortal S3 board def & update protomatter #8056
Conversation
tested: * board.LED * neopixel as status LED * i2c scan finds lis3dh sensor * psram capacity not tested: * rgb matrix o_O * the gpio pins Introduce new `board` properties for matrixportal-style boards: * MTX_COMMON * MTX_ADDRESS These are intended to simplify use of the RGBMatrix constructor: ```py matrix = RGBMatrix(..., addr_pins=MTX_ADDRESS[:3], **MTX_COMMON) ``` removing the need for sending in the following individual parameters: * rgb_pins * clock_pin * latch_pin * output_enable_pins and making construction of a 16/32/64-row display easy by slicing a tuple of all address pins rather than writing out the individual pins. If it works out it'll be ported back to the matrixportal m4 as well.
@ladyada fyi |
I'm trying to build this on my system (and it very well could be my particular setup), but am running into this error when building:
Any ideas? |
Ok, I've gotten past that issue (plus a few more that I already figured out) and am now stuck on:
|
Ok, I just tried again and this time it worked. |
After testing, the CIRCUITPY drive appears, however there is no output to the matrix. I went ahead and ran one of the examples from the RGB Matrices Learn guide and plugged in the correct pins. After running the code, I'm getting It apparently works fine in protomatter in arduino. I looked further into this and apparently it has been updated to treat the ESP32-S2 and ESP32-S3 a bit different (https://github.com/adafruit/Adafruit_Protomatter/blob/master/src/core.c#L179-L185). |
and re-organize so that esp32 s2/s3 don't do as much at reset .. it's not necessary (because most data is in esp-idf managed memory) and doing this saves me from having to debug why reconstruct isn't working properly on that platform. This needs to be tested on other platforms again before being merged!
@makermelissa this now works without crashing for me on my test setup, including when I exit the REPL. Part of testing this PR will need to be going back and testing all the other micros that have rgbmatrix because they may be affected by the protomatter update or my re-org of what happens during interpreter reset to preserve the display. |
yay i will test on hardware once there are artifacts |
I tested and it's working great for the most part. The changes I made to the MatrixPortal library were successful. I did have 1 hard crash and it may not have been related to this PR. Basically, I was:
I tried the same thing a second time, but it just stopped doing anything once I renamed code.py. Anyway, it's pretty minor and unlikely to happen most of the time, so I wouldn't block this PR because of it since a simple reset fixes it. Artifacts are there, so I'll continue testing with the other boards. For the ESP32-S2, I'll try and see if I can get a FeatherWing working with the ESP32-S2 Feather. |
Tested successfully using the following: Note: I did not test with the new constructor. I just tested using the old one. |
thank you so much for the extensive testing @makermelissa ! ❤️ |
I will mark this PR out of draft mode once the related PR in protomatter is merged: |
While testing, I realized BUTTON_UP (IO6) and BUTTON_DOWN (IO7) are missing from board. |
I'm not sure if it's necessary, but ACCELEROMETER_INTERRUPT (IO15 on the S3) is also not defined. |
Since this was stopping me from continuing to test, I added these to my local source and built it successfully. Let me know if you'd like me to push a commit. |
The PR within protomatter has been merged, so this is hopefully also ready @makermelissa |
oops, your comments crossed with mine. Please do add those buttons to this PR if github will let you! |
Ok, buttons added! |
Let's wait until I finish testing the remaining guides before merging this in case I find something else. |
Also, I also noticed while copying files it does this seizure-inducing flickering on the panel. I figure that it is due to whatever you needed to do to get CircuitPython not to crash. |
On devices where the code & CIRCUITPY reside on the same flash chip, the erase cycle (esp_partition_erase_range in this case) prevents other code from running unless it's been specially placed in RAM. I suspect this probably hasn't been done. (I didn't do it!) Are there any Arduino examples that combine protomatter & USB mass storage? If so, how do they behave when writing to mass storage? |
After a quick search, it looks like this example may qualify: https://github.com/adafruit/Adafruit_Protomatter/tree/master/examples/animated_gif I haven't run it yet, so I'm not sure about the behavior, but I'll let you know after I get to it. |
The flickering happens with that example as well, so it should be fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point with what I've tested, I think it should be good fine to add.
Although this driver and associated hardware can be used on any board, it makes to only freeze it for PYB and PYBD boards. It can be easily copied to any board if needed. Fixes issue adafruit#8056. Signed-off-by: Damien George <damien@micropython.org>
tested:
not tested:
Introduce new
board
properties for matrixportal-style boards:These are intended to simplify use of the RGBMatrix constructor:
removing the need for sending in the following individual parameters:
... and making construction of a 16/32/64-row display easy by slicing a tuple of all address pins rather than writing out the individual pins. If it works out it'll be ported back to the matrixportal m4 as well.