Matrix Portal M4 Circuitpython non blocking requests

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lmurdock12
 
Posts: 4
Joined: Tue Jun 21, 2022 1:34 am

Matrix Portal M4 Circuitpython non blocking requests

Post by lmurdock12 »

Hi all,

I am using the MatrixPortal M4 to drive an LED panel that displays scrolling text. I need to be making GET requests while the text is scrolling. Currently, the adafruit_request.get() function is blocking and the scrolling feature of my code gets delayed until the request completes. Is there any way to to make the request non-blocking and simultaneously carry out the request while the matrix panel is still scrolling?

I figured since there is a completely separate ESP32 with the sole job of carrying out requests there should be a way to let the SAMD continue to drive the matrix while the request is being carried out on the ESP.

Any insight into potential approaches to finding a solution for my issue would be greatly appreciated. If this is something that would simply not be possible to do, pointing that out would be helpful too.

I was originally thinking the async library, but have not had much luck implementing something that meets my needs so far.

User avatar
mikeysklar
 
Posts: 14180
Joined: Mon Aug 01, 2016 8:10 pm

Re: Matrix Portal M4 Circuitpython non blocking requests

Post by mikeysklar »

This discussion has come up before in the Adafruit_CircuitPython_Requests github repo (closed issue).

https://github.com/adafruit/Adafruit_Ci ... /issues/69

You have the right idea. Get passed non-blocking with an async library.

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

Return to “Metro, Metro Express, and Grand Central Boards”