I finally took the jump and decided to try out the ESP32 world. I thought it would be smart to start with the real deal so I purchased 3 Espressif ESP32-S3 DevKitC-1 boards or are they called modules?? Seemed like the simplest place to start programing was with the Arduino IDE so I downloaded that, Ver 2.3.6. In my research I found you needed to have "https://espressif.github.io/arduino-esp ... index.json" in the Additional Boards Manager URLs under File>Preferences. I also found I needed to install the "esp32 by Espressif Systems" board manager which I did, VER 3.3.0. Picked the ESP32S3 Dev Module as my board and found the correct com port.
Just wanted to start simple with the "Hello World" sketch and also tried the blink sketch. Interestingly when I first plugged in one of the boards the RGB LED was blinking multiple colors and when I brought up the Serial Monitor there was also some info being sent so I was guessing Espressif was putting some code on the boards from the factory to insure they are functional. To me that shows the serial ports are setup correctly and the board is functional.
In Arduino IDE when I click the "Upload" button on my sketch it compiles but I get a "Failed to connect to ESP32-S3: Invalid head of packet (0x1B)" error. In researching that I find a lot of conflicting suggestions on holding buttons. My Espressif board has a "Boot" button and a "Reset" button. Some people said you have to just press and release the boot button when it says "Connecting ....", others say you have to hold the "Boot" button the whole time, others yet say hold the "Boot" and press and release the "Reset".
Since I bought the real deal I looked up Espressif "Boot Mode Selection" here:
https://docs.espressif.com/projects/esp ... oader-mode
It says:
The ESP32-S3 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash. GPIO0 has an internal pullup resistor, so if it is left unconnected then it will pull high. Many boards use a button marked “Flash” (or “BOOT” on some Espressif development boards) that pulls GPIO0 low when pressed.
So this sounds to me like you need to hold the "Boot" button down to pull GPIO0 low then press the "Reset" button to get into the "serial bootloader". I did that and then when I hit the "Upload" button it does seem to down load, the output window provides info on the board then info on writing and ends with "Hard resetting via RTS pin..." and the status window says "Done Uploading". The RGB light on the board no longer blinks so it seems like I replaced the original code but my code doesn't appear to be running, no blinking light and no "Hello World" on the serial terminal. I tried the reset button thinking if it was there maybe it just hadn't started running but no go.
Back on the Espressif page referenced above I also find you can boot the ESP32-S2 into Firmware Download mode. I am guessing this is NOT the same thing as the "serial bootloader". One page I found in my research said don't play with this mode unless you know what you are doing, which I obviously don't. I am afraid on the board that I can now download to now that I may have put it in Firmware Download Mode by trying various button pressing combinations. I didn't want to try another of my 3 boards until I understood better what is going on in case I bricked the first one, didn't want to do more.
Seems so simple on all the youtube and other sources but things never seem to work as easily as you see. Lots of little details that get breezed over I am guessing. Lots of other knock off boards that work differently I guess.
So any help on how to get a simple Hello World to download and run?
Newbie Uploading Issues, HELP please
-
lbernstone
- Posts: 1132
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Newbie Uploading Issues, HELP please
The ESP32-S3 devkit has two usb ports, labeled USB and UART. Use the UART plug for now.
If you get "failed to connect" errors on this port, you have a connection problem. This is very likely a problem with your usb cable. Make sure you use a quality cable to connect. If your device is still running the original program (the blinking lights), you should be able to open the "Serial Monitor" in Arduino and see log info coming from the device (at 115200 baud).
If you get "failed to connect" errors on this port, you have a connection problem. This is very likely a problem with your usb cable. Make sure you use a quality cable to connect. If your device is still running the original program (the blinking lights), you should be able to open the "Serial Monitor" in Arduino and see log info coming from the device (at 115200 baud).
Re: Newbie Uploading Issues, HELP please
I use the usb port labeled USB
e.g. using IDE 2.3.5 ESP32 core 3.3.0 I can compile, link and upload the following blink and Serial monitor test program
press RST (reset) to run - serial monitor displays
e.g. using IDE 2.3.5 ESP32 core 3.3.0 I can compile, link and upload the following blink and Serial monitor test program
Code: Select all
// ESP32-S3-DevKitC-1 - blink LED and test Serial monitor output
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
#define LED_BUILTIN 97
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
delay(3000);
Serial.printf("\n\nESP32-S3-DevKitC-1 Blink - LED_BUILTIN %d\n", LED_BUILTIN);
}
// the loop function runs over and over again forever
void loop() {
Serial.print('#');
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Code: Select all
ESP32-S3-DevKitC-1 Blink - LED_BUILTIN 97
#####Who is online
Users browsing this forum: No registered users and 1 guest