1

I am using this Adafruit_Protomatter library with an Adafruit MatrixPortal M4 and PlatformIO. Since I do blocking HTTP requests with WiFiNINA (adafruit fork), I thought I can update the matrix in an timer interrupt to be able to do a scollable text.

I am using the SAMD_TimerInterrupt library for the interrupts:

SAMDTimer ITimer0(TIMER_TC3);

Unfortunately, the program execution crashes if I call matrix.show() in the TimerHandler. The setCursor() and print() methods do not lead to a crash and I don't know why.

void TimerHandler0()
{
   static uint32_t curMillis = 0;

   curMillis = millis();
   if (curMillis > TIMER0_INTERVAL_MS)
   {
     matrix.fillScreen(0);
     matrix.setCursor(textX, textY);
     matrix.print(str);
     if ((--textX) < textMin)
        textX = matrix.width();
     matrix.show();
   }
   preMillisTimer0 = curMillis; 
}

Maybe there is a better way of doing HTTP requests/blocking operations during an scrolltext? I was not able to find a way of doing e.g. async http requests with the MatrixPortal...

Thanks in advance and best regards, Daniel

Tarmo
  • 3,728
  • 1
  • 8
  • 25
  • Maybe I can rephrase my question: Is it possible to make an async HTTP request with an ESP32 added as a WiFi Co-Processor like in the Matrix Portal or the Adafruit AirLift? – Kanadagermane Nov 16 '21 at 19:47

0 Answers0