Created on: 21 September 2017
ESP-WROOM-32 testing and first use of the ESP32 Devkit board from DOIT (doit.am), also sold as Geekcreit ESP32 Development Board with WiFi and Bluetooth. How to start using the ESP32 Devkit from DOIT.
This article shows how to do some basic initial tests to see if a new ESP32 Devkit board is working. It also shows how to install Windows drivers for the board and how to communicate with the board from a serial port terminal program in Windows and Linux. The ESP32 Devkit board from DOIT is based on the ESP-WROOM-32 microcontroller from Espressif with integrated WiFi and Bluetooth.
LuaNode is preloaded on the board allowing it to be programmed in the Lua programming language. Some simple programs written in Lua are used to test the board to see if it is running.
And FT201X devices are already connected to the PC’s USB ports. The driver can be obtained from the FTDI driver page (see Appendix A – References). Note that even when the executable installer has been run, the devices must be connected to the PC in order to complete the installation. 2The FT201X has the default I C address of 0x22.
Below is a top and bottom view of the board used in this tutorial.
DOIT ESP-WROOM-32 Devkit used in this Testing and First Use Tutorial
This section contains the basic minimum information that anyone using the ESP32 Devkit board needs to know before starting to use it, test it or program it.
The ESP32 Devkit board is powered from a micro-USB connector. Plug a USB cable with micro-B plug into the micro-USB socket on the board and the other end into a PC USB port to power up the board. A regulator on the board supplies the ESP-WROOM-32 module with 3.3V derived from the USB 5V.
ESP32 Board Micro-USB Connector
Two main components or ICs are found on the board:
ESP-WROOM-32 Microcontroller Module and CP2102 USB-to-UART Bridge
A red LED indicates that the board is powered up and has 3.3V from the regulator. The blue LED is user programmable and is connected to the GPIO2 pin of the ESP-WROOM-32 module.
Both LEDs are shown illuminated in the image below.
LEDs on the ESP32 Devkit Board
More information on each hardware and software component of the ESP Devkit board can be found at the following links.
There should be no need to install the LuaNode software on the board, it should already be installed when purchased.
The first and most basic test that can be done is to power up the board via a USB cable and to check that the red LED lights up as shown in the image below. This confirms that the 3.3V power from the on-board regulator is working.
ESP32 Devkit Power On Led
The next basic test is to see if the board can be detected by the operating system and load drivers for it.
Linux drivers should already be installed on most Linux systems. Plug the ESP32 Devkit board into the Linux PC using a USB cable and enter the following command to find the name of the port that the board is connected to.
A more basic and manual test to see if the drivers on a Linux computer have loaded is to first enter the following command in a terminal window without the board plugged into the PC.
Now plug the board in and run the same command again. The new device starting with tty that appears in the list is the ESP32 Devkit board. For example, it appears as ttyUSB0 on my Linux Mint computer.
Also try the following command before and after plugging the board in to see if the board is configured as a ttyUSB device.
Drivers must be installed on Windows systems for the Silicon Labs CP2102 USB-to-UART bridge chip. After drivers have been loaded, the board appears as a virtual COM port (VCP) on the PC.
Go to the CP210x USB to UART Bridge VCP Drivers page and select the driver for your version of Windows. For Windows 7 and 10 download from the Download VCP link as shown highlighted by a red dot below.
CP2102 Driver Download
Extract the contents of the downloaded zipped driver file and copy the contents to a folder on your PC.
Use a USB cable to plug the board into a PC USB port. The device driver installation will fail.
Click the Windows Start button and search for device manager. Click Device Manager in the search results to open it as shown below.
CP2102 in Windows Device Manager
Right-click CP2102 in the Device Manager window and select Update driver software... on the menu that pops up. In the dialog box that opens, click Browse my computer for driver software. In the next dialog box, use the Browse... button to navigate to the folder that you extracted the drivers to, then click the Next button as shown below.
CP2102 Windows Driver Install
Drivers for the CP2102 will now be installed on Windows. Click the Close button when done.
A terminal program is needed to connect to the Lua interpreter on the ESP32 board via the virtual COM port.
If you don't have a serial port terminal program installed on your PC, you can download Tera Term for Windows. Go to the Tera Term download page and download the newest release of Tera Term. Download the zip file, e.g. teraterm-4.96.zip.
Extract the teraterm folder from the downloaded zipped file and place it in a convenient location, e.g. on your desktop.
To run Tera Term, open the folder, e.g. teraterm-4.96, then find and double-click ttermpro.exe.
Minicom is a text based serial port terminal program for Linux that is run from the command line. On Ubuntu based Linux distributions such as Linux Mint, enter the following command to install Minicom.
In this test the serial port terminal program is connected to the ESP32 Devkit board. When a connection is made and the board is booted up, diagnostic messages and the Lua prompt will be seen in the terminal window.
Before connecting, start Device Manager again and expand the Ports (COM & LPT) item. Find the item called Silicon Labs CP210x USB to UART Bridge (COM4) where COMx at the end shows the COM port number of the ESP32 Devkit board. Now that we know the COM port number, we can connect to the board.
Start Tera Term and close the new connection dialog box that pops up. On the top menu select Setup → Serial port.... In the dialog box that opens, select the COM port that you found in device manager and the following parameters: Baud rate: 115200, Data: 8 bit, Parity: none, Stop: 1 bit and Flow control: none as shown in the image below.
ESP32 Devkit Serial Port Settings in Tera Term
Click OK when done. Tera Term should now connect to the Devkit board and information from the board should scroll up the terminal window. Finally the Lua command prompt should appear as shown in the image below. If no connection was made, select File → New connection... from the top menu. Select the Devkit COM port in the dialog box that opens, make sure that Serial is selected and click OK.
Tera Term Lua Prompt
At the prompt, enter the following Lua command that will restart the board and display the boot-up messages again.
The board can also be manually reset by pressing the EN button found next to the micro-USB connector.
Minicom must initially be set up with the communication parameters for the ESP32 Devkit board. This only has to be done once.
Before continuing, make sure that you are a member of the dialout group. This can be changed by opening Users and Groups in Linux Mint. You will need to log out and then back in again for the changes to take effect.
Open a command line terminal window and enter the following to start the Minicom setup. This will change the default Minicom settings, so must be started as super user because the settings file is saved in the main file system.
A menu will appear. Use the down arrow key to move to Serial port setup and then hit the enter key. Type A to change the serial port to the port that the ESP32 Devkit board is connected to. E.g. change it to /dev/ttyUSB0 and then hit the Enter key. Hit F to set the Hardware Flow Control to No. The default communication parameters should already be right for the board – 115200 8N1.
The image below shows the minicom serial port parameters set up for the ESP32 Devkit. Just make sure that you change the Serial Device to the correct one for your system.
Minicom ESP32 Devkit Serial Port Settings
Hit the Enter key to get back to the main Minicom menu. Use the down arrow key to select Screen and keyboard then hit the Enter key.
Press the Q key to switch local echo on so that you will be able to see what you are typing in minicom. Hit Enter to get back to the main menu. Now select Exit from Minicom and press Enter.
First plug your ESP32 Devkit board into the PC USB port. Start Minicom, by entering minicom in a terminal window. Minicom will start and connect to the Devkit board using the parameters previously set up.
Press the En button found next to the micro-USB connector on the ESP32 Devkit board to reset the board. Boot-up text will scroll across the Minicom window, after which the Lua command prompt will appear.
At the prompt, enter the following Lua command that will restart the board and display the boot-up messages again.
Stay connected using Minicom for the next test. When you need to exit Minicom, press Ctrl + A on the keyboard, then press the X key. Finally hit the Enter key to select the default 'Yes' to exit.
It is assumed that you have followed the above instructions and are connected to the ESP32 Devkit board using Tera Term in Windows or Minicom in Linux or have connected using some other serial port terminal program.
At the Lua prompt in the serial port terminal, enter the following commands to first set GPIO2 (pin connected to the blue LED) as an output pin and then switch the blue LED on.
The LED can be switched off by entering the following command.
This concludes the very basic testing of the ESP32 Devkit board. If you managed to run all of the above tests successfully, then you know that your board is powering up correctly, serial communications are working and the microcontroller is booting Lua. Also the blue LED is working which means that the microcontroller is running and responding to commands.
Articles Menu
You can use Android Debug Bridge (ADB) to connect your Fire tablet to your computer for testing and debugging. You connect your computer to your Fire tablet through a micro-USB cable.
Android Debug Bridge (ADB) is a command-line utility for running and managing Android apps on your device or emulator. For more information and instructions on using ADB, see Android Debug Bridge.
If you're looking for instructions on connecting to a Fire TV instead, see Connect to Fire TV Through ADB.
Go to Settings > Device Options and look for a Developer Options menu. If it's not there, do the following:
a. Go to Settings > Device Options > About Fire Tablet.b. Tap your Serial Number seven times.c. Return to Device Options. A new menu appears called 'Developer Options.'
ADB is available on your computer when you install Android Studio. If you don't already have Android Studio, download and install Android Studio. If you're not using Android Studio, you need to download and install Android SDK platform tools.
Using a USB cable, connect your Fire tablet to a USB port on your computer.
Note that Fire tablets can treat the USB with different transfer options. After connecting the USB cable, swipe down from the top of your tablet to see the USB option used. You might see various notifications, including the USB connection type that was used when you connected the cable. The relevant notification is highlighted in the screenshot below.
If you don't see 'Connected as Media Device', press Tap for other USB options. Then select Media device (MTP). Later Fire OS versions have a different interface here. If you're using Fire OS 7, select File Transfer.
If you don't see the USB connection type in the above notifications, go to Settings > Device Options > Developer Options > USB computer connection. Set this to Media device (MTP). For Fire OS 7, select File Transfer.
When the Allow USB debugging? dialog appears on your tablet, tap OK.
Open Android Studio and look for the device to appear in devices drop-down menu:
The device's name will use the android.os.Build.MODEL
property for the device. KFSUWI
refers to Fire HD 10 (2017) tablet. You can see a list of build model names in the Identifying Fire Tablet Devices.
If you have not selected the 'Allow USB Debugging' dialog on your tablet, the name 'Unknown device' will appear in the devices drop-down menu in Android Studio until you allow debugging.
With the tablet connected, you can now run your app on your tablet by clicking the Run App button in Android Studio.
If you run into issues, see the Troubleshooting section below.
Instead of looking in the devices menu in Android Studio, you can also use some ADB terminal commands to confirm that your device is connected. ADB is useful for performing many other operations as well, such as entering sandbox mode or installing other assets. Follow these two sections:
If you skip adding ADB to your PATH, you can also Check for Connected Devices If ADB Isn't In Your PATH.
First, add ADB to your PATH so you can more easily run ADB commands. (Your PATH is an environment variable used to specify the location of the program's executable. If you don't add ADB to your PATH, running ADB commands will require you to browse to the <Android SDK>/platform-tools
directory to run adb
.)
adb version
from a terminal or command prompt. If you get back version information, then ADB is in your PATH. If the response says adb
is an unrecognized command, ADB is not in your PATH.To add ADB to your PATH on Mac:
Get the path to your Android SDK platform-tools directory:
Open Android Studio and click the SDK Manager button .The location to your Android SDK appears near the top next to Android SDK Location. For example: /Users/<your username>/Library/Android/sdk
If this is your first time opening Android Studio, there isn't an SDK Manager button. Instead, at the Welcome to Android Studio prompt, click Configure > SDK Manager and provide the location to the Android SDK.
Use the following command to add ADB to your .bash_profile. Replace <your username>
with your actual username. Also, make sure the path points to your Android SDK.
Your .bash_profile
file is usually in your user directory, which you can find by typing cd ~
(change to your user directory). Then type ls -a
(list all) to show all files, including hidden ones.
If the file isn't there, simply create one. You can then type open .bash_profile
to see the paths listed.
After you add this PATH to your bash profile, you should see the following in your .bash_profile
file:
(Only instead of johndoe
, you will see your own username.)
Fully restart any terminal sessions, and then type adb
. If you successfully added ADB to your path, you will see ADB help info rather than 'command not found.'
To add ADB to your PATH on Windows:
Get the path to your Android SDK platform-tools directory:
Open Android Studio and click the SDK Manager button .
The location to your Android SDK appears near the top next to Android SDK Location. For example: C:Users<your user name>AppDataLocalAndroidSdk
If this is your first time opening Android Studio, there isn't an SDK Manager button. Instead, at the Welcome to Android Studio prompt, click Configure > SDK Manager and provide the location to the Android SDK.
Do one of the following:
;
and then press Ctrl+V to insert the path to your SDK that you copied earlier. It may look like this: ;C:Users<your user name>AppDataLocalAndroidSdkplatform-tools
. Click OK on each of the three open dialog boxes to close them.adb
. If you successfully added ADB to your path, you will see ADB help info rather than 'command not found.'Assuming ADB is added to your PATH, run the following commands:
Confirm that the serial number for your Fire tablet appears in the list of devices. For example:
On your tablet, your device's serial number is located under Settings > Device Options.
If your terminal doesn't recognize adb
as a command (that is, you didn't add ADB to your PATH), you might have to run the commands from the SDK directory that contains ADB.
Browse to this location in your terminal or command prompt. For example:
Mac
Windows
Then go into the platform-tools
directory:
The platform-tools
directory contains adb
.
Now run the ADB commands as follows:
Mac:
Windows:
The response should list your device's serial number. For example:
If your Fire tablet is still not detected, you may need to reboot your computer or log out and back in for the changes to take effect.
If you don't see your tablet device in the list of devices in Android Studio, click the devices drop-down menu and select Troubleshoot device connections:
Click Rescan devices.
If rescanning devices doesn't detect your Fire tablet as a device, your micro-USB cable might be bad, you might have the wrong USB connection type (e.g, camera instead of media device), or you might not have enabled USB debugging. You can also try restarting your computer and the tablet.
If you previously connected a Fire tablet without first enabling ADB on the Fire tablet, you might need to remove the existing USB device driver and force re-installation of the driver. To remove the non-ADB driver:
You can confirm that the Fire driver is installed correctly by doing the following:
In Device Manager, under Fire Devices, verify that that a device appears called Android Composite ADB Interface.
If your Device Manager shows an Other Devices section with a second Fire device with a yellow alert sign, your computer is listing Amazon's unrecognized ADB module as a separate device. To fix this issue:
C:Program Files (x86)Amazon.comFire_DevicesDrivers
) and select it.Ignore the warning regarding installing drivers and proceed.
You should now correctly see your Fire tablet with the ADB driver installed.
Last updated: Oct 29, 2020