I already have the Arduino plugin installed. Just not familiar with using it. As a new Arduino user I am still learning how they work and all tutorials out there talk about how to make it work with the standard Arduino IDE thus why I haven’t tried to use VS.
Have you found a fully functional ESP32 sketch? Realistically for the M2 I can imagine we only need it to serve as a host for WiFi and as a Serial port for BT so a bunch of the commands would be unnecessary but as long as those basic services are provided for they should work.
But still would like to find a way to upload the binaries to the ESP32 from ESP-IDF.
As to the AT commands. You shouldn’t allow AT commands to be received by the ESP32 from the wifi or bt.
When AT commands are received from the ESP32 normally they are not echoed but if echoing is turned on then what I would suggest is that we add a custom command to ignore the next AT command then put a bogus AT command after the data… This would allow the ESP32 unit to ignore the AT command within the data but if there is no AT command the bogus AT command would be run allowing the ESP to take further information. This is assuming when running a program you don’t blindly send AT commands without getting a response and checking it. Otherwise you have to parse the string before it is sent to the ESP and bracket it with the “ignore next AT command” whenever there is an AT command. I would assume the Arduino would have enough processor speed to be able to do this parsing and adding of commands if necessary.
I MAY try tinkering with the sketch posted here later today. I BELIEVE the ESP-IDF expects the GPIO0 line to be held high the whole process so I will try changing the sketch so when the first button is pressed it will hold the GPIO line high, wait a short period then press the reset for a short period but leave the GPIO0 line high until the button is pressed again or the reset button is pressed.
Rodney