kriswiner / ESP32

Arduino sketches for the ESP32
167 stars 47 forks source link

Can not upload sketches #4

Closed mjs513 closed 7 years ago

mjs513 commented 7 years ago

Hi Kris

Just soldered up your board and tried to upload a test sketch. I keep receiving the following error messages: A fatal error occurred: Failed to connect to ESP32: Invalid head of packet ('V') A fatal error occurred: Failed to connect to ESP32: Invalid head of packet ('V')

I selected the ESP32 Dev Board from the Arduino IDE. Is this the correct board. I keep trying to upload but can not?

UDPATE: After reading a little more I saw that I had to change flash mode from dio to dout in boards.txt. I went into the esp32 boards.txt file and added a new board as shown below but no luck - same error:

##############################################################

esp32t.name=ESP32 Dev Module Onehorse

esp32t.upload.tool=esptool esp32t.upload.maximum_size=1044464 esp32t.upload.maximum_data_size=294912 esp32t.upload.wait_for_upload_port=true

esp32t.serial.disableDTR=true esp32t.serial.disableRTS=true

esp32t.build.mcu=esp32 esp32t.build.core=esp32 esp32t.build.variant=esp32 esp32t.build.board=ESP32_DEV_Onehorse

esp32t.build.f_cpu=240000000L esp32t.build.flash_mode=dout esp32t.build.flash_size=4MB

esp32t.menu.FlashFreq.80=80MHz esp32t.menu.FlashFreq.80.build.flash_freq=80m esp32t.menu.FlashFreq.40=40MHz esp32t.menu.FlashFreq.40.build.flash_freq=40m

esp32t.menu.UploadSpeed.921600=921600 esp32t.menu.UploadSpeed.921600.upload.speed=921600 esp32t.menu.UploadSpeed.115200=115200 esp32t.menu.UploadSpeed.115200.upload.speed=115200 esp32t.menu.UploadSpeed.256000.windows=256000 esp32t.menu.UploadSpeed.256000.upload.speed=256000 esp32t.menu.UploadSpeed.230400.windows.upload.speed=256000 esp32t.menu.UploadSpeed.230400=230400 esp32t.menu.UploadSpeed.230400.upload.speed=230400 esp32t.menu.UploadSpeed.460800.linux=460800 esp32t.menu.UploadSpeed.460800.macosx=460800 esp32t.menu.UploadSpeed.460800.upload.speed=460800 esp32t.menu.UploadSpeed.512000.windows=512000 esp32t.menu.UploadSpeed.512000.upload.speed=512000

esp32t.menu.DebugLevel.none=None esp32t.menu.DebugLevel.none.build.code_debug=0 esp32t.menu.DebugLevel.error=Error esp32t.menu.DebugLevel.error.build.code_debug=1 esp32t.menu.DebugLevel.warn=Warn esp32t.menu.DebugLevel.warn.build.code_debug=2 esp32t.menu.DebugLevel.info=Info esp32t.menu.DebugLevel.info.build.code_debug=3 esp32t.menu.DebugLevel.debug=Debug esp32t.menu.DebugLevel.debug.build.code_debug=4 esp32t.menu.DebugLevel.verbose=Verbose esp32t.menu.DebugLevel.verbose.build.code_debug=5

mjs513 commented 7 years ago

Ok. Figured it out by reading the dragonfly getting started page. You have to hold down the boot button and then press and release the reset button and then it will load the sketch. Then press the reset button again to get into run mode.

Just to let you know it connects in a fraction of a second and runs like a charm unlike the ESP32 Thing from Sparkfun which I could not get to connect for the life of me and communicate correctly. Now the sketch I have working with the associated processing code works like a charm.

I will put it together for you and maybe you can give it a try with your sample 9150_ms56937 code. I don't have that config boarded anywhere so I can not do it for you.

Mike

kriswiner commented 7 years ago

Yes, unlike the Dragonfly, the ESP32 always has to be put into boot mode to flash a new program, and then reset in order to run it on my board. Other boards have an auto reset so the last step isn't necessary.

Glad you got it to work.

Kris

mjs513 commented 7 years ago

Thanks Kris. PS I just ordered your MPU9250_MS5637 (mini). Once I get it I will use your code and merge with my UDP code and post it for your. I have it working with my FreeIMU code so I don't think it will be a problem with yours :) Thanks for all your work.

Mike

kriswiner commented 7 years ago

I look forward to it! Thanks.