Arduino IDE won't compile with Airlift for Matrix Portal M4

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
Apemon
 
Posts: 2
Joined: Wed Mar 16, 2022 8:01 pm

Arduino IDE won't compile with Airlift for Matrix Portal M4

Post by Apemon »

I am trying to use the Arduino IDE to connect the Matrix Portal M4 to Adafruit IO. The device uses a ESP32-WROOM-32E WiFi module which, if I am not mistaken, uses Airlift. I am using the "Adafruit IO Arduino" library by Adafruit and it is version 4.2.0. The library comes with example sketches to easily connect to Adafruit IO and test hardware. The example I am using is "adafruitio_07_digital_out" which I have renamed to "PortalM4_IO_sketch" for building off of it later. Whenever I enable Airlift in config.h, the code fails to compile with this error:

Code: Select all

In file included from G:\arduino-1.8.19\portable\sketchbook\libraries\Adafruit_IO_Arduino\src/AdafruitIO_WiFi.h:26,
                 from G:\arduino-1.8.19\portable\sketchbook\PortalM4_IO_sketch\config.h:36,
                 from G:\arduino-1.8.19\portable\sketchbook\PortalM4_IO_sketch\PortalM4_IO_sketch.ino:19:
G:\arduino-1.8.19\portable\sketchbook\libraries\Adafruit_IO_Arduino\src/wifi/AdafruitIO_AIRLIFT.h: In member function 'void AdafruitIO_AIRLIFT::setLEDs(uint8_t, uint8_t, uint8_t)':
G:\arduino-1.8.19\portable\sketchbook\libraries\Adafruit_IO_Arduino\src/wifi/AdafruitIO_AIRLIFT.h:110:56: error: 'class WiFiClass' has no member named 'setLEDs'
  110 |   void setLEDs(uint8_t r, uint8_t g, uint8_t b) { WiFi.setLEDs(r, g, b); }
      |                                                        ^~~~~~~
G:\arduino-1.8.19\portable\sketchbook\libraries\Adafruit_IO_Arduino\src/wifi/AdafruitIO_AIRLIFT.h: In member function 'virtual void AdafruitIO_AIRLIFT::_connect()':
G:\arduino-1.8.19\portable\sketchbook\libraries\Adafruit_IO_Arduino\src/wifi/AdafruitIO_AIRLIFT.h:176:14: error: 'class WiFiClass' has no member named 'setPins'
  176 |         WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi);
      |              ^~~~~~~
Multiple libraries were found for "Adafruit_ZeroDMA.h"
 Used: G:\arduino-1.8.19\portable\packages\adafruit\hardware\samd\1.7.10\libraries\Adafruit_ZeroDMA
 Not used: G:\arduino-1.8.19\portable\sketchbook\libraries\Adafruit_Zero_DMA_Library
exit status 1
Error compiling for board Adafruit Matrix Portal M4 (SAMD51).
If I disable Airlift, it gives me an error saying I need to enable Airlift or WINC1500.
If I then enable WINC1500, the code does compile, but the device fails to connect to WiFi.

User avatar
Apemon
 
Posts: 2
Joined: Wed Mar 16, 2022 8:01 pm

Re: Arduino IDE won't compile with Airlift for Matrix Portal

Post by Apemon »

Solution semi-found on my own. I went into the AdafruitIO_AIRLIFT.h library and deleted lines 110, 175, 176, and 177. This has enabled the board to finally connect to AdafruitIO with no issues so far. I wonder about the long-term effects of modifying a library in this way. Maybe there is none?

Also the SPIWIFI_SS, NINA_ACK, and NINA_RESETN definitions in config.h of the example sketch were changed to 33, 31, and 30 respectively. The sketch is confirmed working with these changes, however I am unsure whether the changes to these definitions actually made any difference in the outcome. If anyone runs into a similar situation to this, try these changes.

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

Return to “Wireless: WiFi and Bluetooth”