KurtE
Senior Member+
Quick question, I am not totally experienced using the ESP32...
I see on Page 1:
So we are using D1/D2 for Serial1... Or alternatively other pins D7/D8 For other Serial...
Now suppose I load a new program on the T4.1, can I setup another pin to communicate between The two.
Like ESP32 D3 pin connected to Arduino D2 pin?
I assume in Setup I would comment out the line I added:
Can I add something like:
Wondering if the ESP has LED_BUILTIN defined. It compiles, figured it might be the User LED?
And then on Teensy 4.1 add in code to
And in the ping code:
Idea is to try a few times and if that fails to maybe then try to reset the ESP32...
So far I am not noticing if it is working or not...
Ideas?
I see on Page 1:
So we are using D1/D2 for Serial1... Or alternatively other pins D7/D8 For other Serial...
Now suppose I load a new program on the T4.1, can I setup another pin to communicate between The two.
Like ESP32 D3 pin connected to Arduino D2 pin?
I assume in Setup I would comment out the line I added:
Code:
// gpio_reset_pin(GPIO_NUM_21);
Can I add something like:
Code:
#ifdef RESET_PIN
pinMode(RESET_PIN, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(RESET_PIN), reset_esp32, FALLING);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
delay(250);
digitalWrite(LED_BUILTIN, LOW);
#endif
...
// -------------------------------------------------------------------
// Maybe reboot ESP32
// -------------------------------------------------------------------
void reset_esp32() {
esp_restart();
}
And then on Teensy 4.1 add in code to
Code:
#ifdef ESP32_RESET_PIN
pinMode(ESP32_RESET_PIN, OUTPUT);
digitalWrite(ESP32_RESET_PIN, HIGH);
#endif
And in the ping code:
Code:
uint8_t ping_count = 0;
while (!esp32Attached) {
#ifdef ESP32_RESET_PIN
ping_count++;
if (ping_count == 5) {
Serial.println("Reset ESP32");
digitalWrite(ESP32_RESET_PIN, LOW);
delay(1);
digitalWrite(ESP32_RESET_PIN, HIGH);
delay(1000);
ping_count = 0;
}
#endif
Serial.println("Ping ESP32-C3...");
ESP32SERIAL.print("?");
So far I am not noticing if it is working or not...
Ideas?