Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Metro M4 Airlift Lite ESP32 firmware with Arduino IDE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Metro M4 Airlift Lite ESP32 firmware with Arduino IDE

by optiopmk on Fri Mar 26, 2021 7:12 pm

Hi, I am trying to use the Arduino IDE to make an ESP32 firmware for the Metro M4 Airlift Lite. Which ESP32 variant should I choose in the Arduino IDE please? Any guidance would be appreciated please as my bin files I upload do not seem to run.

There doesn't appear to be a Passthrough UF2 for this board (none of the published ones here drive the Neopixel - https://learn.adafruit.com/upgrading-es ... -one-board) so I have modified the Arduino Passthrough code you supply to do the passthrough and loaded this to the ATSAMD51. I can now use command line esptool to load an ESP32 bin. It would be good if the Arduino IDE could successfully upload to the ESP32 using esptool with the passthrough program running in the ATSAMD51. Any advice would be helpful how to do this please.

My code change to the Arduino Passthrough code:

#elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
#define SerialESP32 Serial2
#define SPIWIFI SPI
#define SPIWIFI_SS 36 // Chip select pin
#define SPIWIFI_ACK 37 // a.k.a BUSY or READY pin
#define ESP32_RESETN 38 // Reset pin
#define ESP32_GPIO0 35 // Boot
#define PIN_NEOPIXEL 40
#endif

optiopmk
 
Posts: 2
Joined: Fri Mar 26, 2021 6:54 pm

Re: Metro M4 Airlift Lite ESP32 firmware with Arduino IDE

by User_UMjT7KxnxP8YN8 on Sun Mar 28, 2021 10:49 am

I agree. I programmed a board that has a Mega 2560 and an ESP8266 on it https://smile.amazon.com/gp/product/B07THDDFSJ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1. This board has DIP switches that route the USB serial port so the Arduino IDE can upload to the Mega OR the ESP8266 with the right switch settings.

The Airlift Lite seems to have enough space to add a DIP switch for this purpose on a future version.

User_UMjT7KxnxP8YN8
 
Posts: 233
Joined: Tue Jul 17, 2018 1:28 pm

Re: Metro M4 Airlift Lite ESP32 firmware with Arduino IDE

by adafruit_support_carter on Mon Mar 29, 2021 3:10 pm

Try the Metro_M4_WiFi_ESP32_Passthru.UF2 again. I just tested it and while it did *not* actually light the NeoPixel as mentioned, it did open and create the expected serial port.

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro M4 Airlift Lite ESP32 firmware with Arduino IDE

by optiopmk on Thu Apr 01, 2021 8:03 am

Hi,
Yes the Metro_M4_WiFi_ESP32_Passthru.UF2 does work as does the modified Arduino passthrough sketch with the changes above.

I have diagnosed why the Arduino IDE doesn't work with the passthrough UF2 or above modified sketch:

The Arduini IDE, by default adds --before default_reset option in the upload command line. This won't work because at the moment the esptool sends the reset command after build the GPIO0 on the ESP32 is HIGH and it needs to be low at the moment of reset to enter ESP32 boot mode. I fixed this by setting --before no_reset in the platform.txt file in the C:\Users\MyUser\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6 directory. The ESP32 is already in boot mode due to the actions of the passthrough program in the SAMD.

I have it all working now with ESP32 Dev Module or Firebeetle-ESP32 (in the Arduino IDE), the latter is I believe, the correct ESP32 variant to use in the IDE for this board.

One more point, please could you consider adding a LED (or Neopixel) to one ESP32 GPIO pin on the Metro M4 boards with an on board ESP32 so that the ESP32 can show it's status.

I am planning to use my ESP32 BLE (and ESP Now) code on an M4 Metro with a LED matrix panel to make a scoreboard. I would have used the M4 Matrix Portal board but I assume this is still in pre production so I can't get one yet. Please do consider the status LED for the ESP32 in a future revision of these great boards.

optiopmk
 
Posts: 2
Joined: Fri Mar 26, 2021 6:54 pm

Re: Metro M4 Airlift Lite ESP32 firmware with Arduino IDE

by adafruit_support_carter on Thu Apr 01, 2021 10:38 am

The Matrix Portal is not in pre-production. But parts availability is very difficult right now, which is affecting stock of numerous items. If you are wanting to try the Matrix Portal, please sign up for a NOTIFY ME on the product page. They will be in stock again at some point.

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.