Comments: ESP32 Thing Hookup Guide

Pages

Comments 33 comments

  • One thing the article did not mention is that to upload the code in the Adruino IDE you need to press and hold the 0 button. You need to press it before hitting the Upload button and keep it help down until esptool.py starts to run (i.e. the orange code comes up)

    If you don’t do this you may get one of these errors: A fatal error occurred: Failed to connect to ESP32: Invalid head of packet A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

  • I’m a little confused about pins 36-39. Can they still be used as analog inputs, even though they are connected to the caps? Do I need to cut the trace to use them as inputs?

  • ——————– Tech Support Tips/Troubleshooting/Common Issues ——————–

    ESP32 Board Definitions

    Installing the board definitions of the ESP32 is not as trivial as using the Arduino board manager. Make sure that you install the ESP32 Arduino core definitions correctly or you might see this error:

    exec: "C:\\Users\\...\\Documents\\Arduino\\hardware\\espressif\\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++": file does not exist
    Error compiling for board ESP32 Dev Module.
    

    After going through the installation 4 times from these directions [ https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md ] because the Xtensa and ESP32 Tools were not in the correct folder. I was able to compile and upload to the board once it was installed correctly. You can also follow the directions from our tutorial [ https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide/installing-the-esp32-arduino-core ], just make sure that all the files are installed correctly.

    Upload Error

    If you see this error when uploading:

    esptool.py v2.0-dev
    Connecting...
    
    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
    

    , try holding the pin 0 LOW by pressing down on the button. Doing a test on Arduino IDE v1.6.5 and v1.6.11, I was not able to upload code unless I hold the button down when the IDE was uploading code. Looking into the Eagle files, it looks like he might have already considered using the DTR from the FTDI to reset the ESP32 to upload. Based on previous experience with the esp-type IC’s, it’s possible that there is something in the ESP32 Arduino Core’s board add-on files preventing the ESP32 from automatically resetting when DTR toggles the pin.

    From what I can see in the ESP32 repository’s issues [ https://github.com/espressif/arduino-esp32/issues/60#issuecomment-261771864 ], people that had similar errors were able to upload when GPIO0 was held low (i.e. pressing button 0 down). I am not sure what ESP32 development board was used in the issue reported.

    ESP32 Resetting when Serial Monitor Closed

    This sounds normal. Just like any Arduino connected to the Arduino IDE’s, the Arduino resets when you initialize the serial monitor. For the ESP32, it sounds like it might be doing the same thing when the serial monitor is closed. There might be some serial data being sent to the ESP32 that tells it that the serial monitor is closing and it is probably resetting as a result. Doing a quick test with our known good, I am seeing the same behavior. I am not sure how to avoid this.

  • I get “>>> Client Timeout !” when running the Wifi example.

    1) It is connecting to the internet. I’ve double checked this. 2) Output says Connected! and then after a brief pause shows the timeout message. 3) I’ve tried increasing the timeout to 15 seconds

    Any ideas?

    The exact output is:

    WiFi connected!
    IP address: 192.168.5.212
    Press button 0 to connect to google.com
    
    ------------------------------
    Connecting to domain: google.com
    Connected!
    
    ------------------------------
    [E][WiFiClient.cpp:196] available(): 88
    >>> Client Timeout !
    
  • I see the serial module error too, and I do have pyserial installed. And I am able to import serial in my other python programs that I’m running from the terminal. Any suggestions?

    • I am also experiencing this issue. Fresh install of Python 2.7 and fresh install of the board on Mac running El Capitan

      Error Message from Arduino: Arduino: 1.6.12 (Mac OS X), Board: “ESP32 Dev Module, 80MHz, 921600”

      Traceback (most recent call last): File “/Users/LisaSemidey/Documents/Arduino/hardware/espressif/esp32/tools/esptool.py”, line 25, in <module> import serial ImportError: No module named serial exit status 1 Error compiling for board ESP32 Dev Module.

      This report would have more information with “Show verbose output during compilation” option enabled in File -> Preferences.

      • Member #859570, Did you have pyserial installed? I find that the most common solution to this problem is not having pyserial installed. However, I do have it installed and it works with python when I import it in the terminal.

        • I do have pyserial installed.

          • Hi Member #859570, As I had guessed, I had two versions of python installed on my machine and the Arduino compiler was calling the wrong one. Look at this thread for a possible solution (I’m still trying to point the compiler to the right version, but let me know if you manage to do that.): https://github.com/espressif/arduino-esp32/issues/13

  • If you are having difficulty getting Blink t compile with a fresh install of Python 2.7 and the Arduino IDE, with a “‘serial’ module not found' error or similar, try installing ‘pyserial’. If the installer hits a wall because it cannot locate a registry entry for your Python version, try this: http://stackoverflow.com/questions/17872234/how-to-add-python-to-windows-registry

  • Hi! I have a specific question. I want to drive a LCD 20x04 I2C Display with the ESP32 Thing. This display requires 5 V for VCC. Any suggestions on how a schematic should look like (e.g. implementing a boost converter) ? Thanks!

  • Got this board yesterday given it has some perfect specs for a project I’m doing. However, now I read in the Hookup guide that several key features aren’t implemented; analogRead and analogWrite is absolutely crucial for my use, touch I have a couple of ideas for, might not be essential though, and BLE is pretty much the reason I got it.

    That said, the Hookup Guide I guess wasn’t written yesterday, so the status may have changed, so could someone enlighten me as to which of those features, if any are now available?

    • analogRead() is definitely now available - just used it today. However be warned that the ADC on the ESP32 is noisy and non-linear. They are apparently working on compensation curves and calibration code for the non-linearity. For the noise you need to just oversample and average for now. 100 samples seems to do the trick to make the ADC usable as an 8-bit value without taking too much extra time.

  • BLE still not supported natively with adruino IDE…

  • When is there going to be a more complete BLE library for arduino?

  • I hope to get helpful resource from you. Thanks :) ;) https://www.youtube.com/watch?v=uGUrgOV_6ro

  • I hope to get helpful resource from you. Thanks :) ;) https://www.youtube.com/watch?v=uGUrgOV_6ro :) ! :)

  • Board works OK and it works fine with the Arduino IDE with ESP32 extension. One thing though… Serial monitor pins that control transistors for reset and GPIO0 are unstable when only the battery is connected. This will make the operation of the board unstable and can put board into boot mode and perform random reset. So any battery powered applications are not usable without some small modifications to the board.

    • Hi - do you have any info as to what those modifications might be? I’m having some issues with mine that only show up when I’m powering it from the LiPo battery. Thanks!

      EDIT: Actually, turns out my issues were more related to the powering of my sensor - the GY-521 breakout board from the MPU6050 and not battery powering the Thing. But still curious!

  • Is there anyway for the ESP32 Thing board to detect when power has been lost and it is running on the battery?
    This would be very helpful to have the ESP32 send an alert out stating power has been lost.

  • Power consumption lower than 2mA, is it possible ? I did cut the trace for the PWR led, did try any combination of (slow/fast mem) : esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF); with gpio pin wake, seems to work but only down to 2 mA (2.5mA if Vbat is used, instead of V33). Also changed, the bat. charge current limiting Resistor to 10K.

    my code: https://github.com/marcos69/Esp32Prowl_Thing

  • Espressif has updated the instructions for getting the core on their github page. I followed them explicitly but the 32 does not show up in the board manager. Any idea how to fix that?

    • Thanks for the heads up. I updated the installing instructions here a bit too.

      I uninstalled and reinstalled, and it seems to be working for me (following the Windows directions). Make sure you’ve installed the core in your Arduino sketchbook - exactly as specified. The “esp32” folder should reside in “{Sketchbook Location}/hardware/espressif/”.

  • What’s the range of the BLE? As in, how far away can it be before BLE connection gets flaky?

  • I have gone thru the steps to set up on a Windows 8 machine. When I compile a sketch I get the following error:

    Arduino: 1.6.13 (Windows 8.1), Board: “ESP32 Dev Module, 80MHz, 921600”

    exec: “C:\Users\Jimmy\Documents\Arduino\hardware\espressif\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++”: file does not exist Error compiling for board ESP32 Dev Module.

    This report would have more information with “Show verbose output during compilation” option enabled in File -> Preferences.

    • I had that same error on my Arduino IDE v.1.6.13. Make sure that the definitions are installed correctly. Try following these directions => [ https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md ]. It took me a few times because I didn’t type the commands correctly in the command prompt. -_-

      The issue is that the file “xtensa-esp32-elf-g++” was not installed in the correct directory for the Arduino IDE to find. After going over step 5 a few times, I was able to install the definitions correctly.

  • Trying to run get.py and I keep getting the error: Traceback (most recent call last): File “C:\Program Files (x86)\Arduino\hardware\espressif\esp32\tools\get.py”, line 124, in <module> get_tool(tool) File “C:\Program Files (x86)\Arduino\hardware\espressif\esp32\tools\get.py”, line 92, in get_tool unpack(local_path, ‘.’) File “C:\Program Files (x86)\Arduino\hardware\espressif\esp32\tools\get.py”, line 55, in unpack zfile.extractall(destination) File “C:\Python27\lib\zipfile.py”, line 1040, in extractall self.extract(zipinfo, path, pwd) File “C:\Python27\lib\zipfile.py”, line 1028, in extract return self.extract_member(member, path, pwd) File “C:\Python27\lib\zipfile.py”, line 1083, in extract_member file(targetpath, “wb”) as target: IOError: [Errno 13] Permission denied: ‘xtensa-esp32-elf\xtensa-esp32-elf\sysroot\lib\libm.a’

    I’ve changed the permissions on libm.a but still no go.

  • Member #590256, this is because you’re using Python3 and not Python2 as required. I am having trouble getting Python2 to work though.

  • Getting an error when uploaded a sketch. Looks like an error in File “C:\Program Files (x86)\Arduino\hardware\expressif\esp32/tools/esptool.py”, line 183

    print ‘%s’ % inst.CHIP_NAME

             ^
    

    SyntaxError: Missing parentheses in call to ‘print’

    • I fixed this one. It is due to a call to python 3. I uninstalled all python 3 copies I had on my machine and that fixed it. Just moving python 2.7 to first on the (Windows) environment variable did not fix this. Uninstalling python 3 was the only way I could find for a fix.


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!