First, I soldered the pads of the ESPRX, ESPTX, and ESPGPIO0 on the back of the FeatherWing.
Second, I put the nRF52840 in bootloader mode, downloaded Adafruit-Feather-NRF52840-FeatherWing-Passthru.UF2 from the guide, and copied it to the feather's BOOT drive.
Next, I installed esptool on Python 3.9.7 using pip.
After that, I downloaded NINA_W102-1.7.4.bin from the guide and ran (my Feather's on COM3 when running in normal mode):
Code: Select all
esptool.py --port COM3 --before no_reset --baud 115200 write_flash 0 NINA_W102-1.7.4.bin
A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x00)
So, then, I attempted to use the SerialESPPassthrough.ino from the same guide. When I tried verifying the Arduino sketch, some errors regarding Serial. So, I decided to look around and eventually found to add "#include "Adafruit_TinyUSB.h"" to the sketch.
Verifying and uploading this SerialESPPassthrough.ino is possible:
Code: Select all
#include <Adafruit_NeoPixel.h>
#include "Adafruit_TinyUSB.h"
unsigned long baud = 115200;
#if defined(ADAFRUIT_FEATHER_M4_EXPRESS) || \
defined(ADAFRUIT_FEATHER_M0_EXPRESS) || \
defined(ARDUINO_AVR_FEATHER32U4) || \
defined(ARDUINO_NRF52840_FEATHER) || \
defined(ADAFRUIT_ITSYBITSY_M0) || \
defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) || \
defined(ARDUINO_AVR_ITSYBITSY32U4_3V) || \
defined(ARDUINO_NRF52_ITSYBITSY)
// Configure the pins used for the ESP32 connection
#define SerialESP32 Serial1
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 13 // Chip select pin
#define ESP32_RESETN 12 // Reset pin
#define SPIWIFI_ACK 11 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 10
#define NEOPIXEL_PIN 8
#elif defined(ARDUINO_AVR_FEATHER328P)
#define SerialESP32 Serial1
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 4 // Chip select pin
#define ESP32_RESETN 3 // Reset pin
#define SPIWIFI_ACK 2 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 -1
#define NEOPIXEL_PIN 8
#elif defined(TEENSYDUINO)
#define SerialESP32 Serial1
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 5 // Chip select pin
#define ESP32_RESETN 6 // Reset pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 -1
#define NEOPIXEL_PIN 8
#elif defined(ARDUINO_NRF52832_FEATHER )
#define SerialESP32 Serial1
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 16 // Chip select pin
#define ESP32_RESETN 15 // Reset pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 -1
#define NEOPIXEL_PIN 8
#elif !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SerialESP32 Serial1
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_RESETN 5 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#define NEOPIXEL_PIN 8
#endif
#if defined(ADAFRUIT_PYPORTAL)
#define PIN_NEOPIXEL 2
#elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
#define PIN_NEOPIXEL 40
#endif
Adafruit_NeoPixel pixel = Adafruit_NeoPixel(1, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(baud);
pixel.begin();
pixel.setPixelColor(0, 10, 10, 10); pixel.show();
while (!Serial);
pixel.setPixelColor(0, 50, 50, 50); pixel.show();
delay(100);
SerialESP32.begin(baud);
pinMode(SPIWIFI_SS, OUTPUT);
pinMode(ESP32_GPIO0, OUTPUT);
pinMode(ESP32_RESETN, OUTPUT);
// manually put the ESP32 in upload mode
digitalWrite(ESP32_GPIO0, LOW);
digitalWrite(SPIWIFI_SS, LOW);
delay(100);
digitalWrite(ESP32_RESETN, LOW);
delay(100);
digitalWrite(ESP32_RESETN, HIGH);
pixel.setPixelColor(0, 20, 20, 0); pixel.show();
delay(100);
}
void loop() {
while (Serial.available()) {
pixel.setPixelColor(0, 10, 0, 0); pixel.show();
SerialESP32.write(Serial.read());
}
while (SerialESP32.available()) {
pixel.setPixelColor(0, 0, 0, 10); pixel.show();
Serial.write(SerialESP32.read());
}
}
A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x00)
I can run the example networkscan sketch from WiFiNINA, which seems to work even when the pads are soldered, so I can confirm that the ESP32 is working in standard mode.
So, before posting this, I began poking around again, and I found that, when opening the Serial Monitor after running the sketch, I can see:
Code: Select all
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x3 (D
Is there something I can do in this scenario? I've been scouring for any information and thinking of other ways to try and approach this issue, but I've seem to have come to an impasse.