Installing ESP32 Board in Arduino IDE on Ubuntu Linux

In this tutorial we are installing ESP32 board in Arduino IDE. Its not same as installing ESP8266. ESP32 is dual core CPU in arduino IDE it will not support all the functions but its enough to make many projects.

ESP32 is highly-integrated with in-built antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. ESP32 adds priceless functionality and versatility to your applications with minimal Printed Circuit Board (PCB) requirements. ESP32 can interface with other systems to provide Wi-Fi and Bluetooth functionality through its SPI / SDIO or I2C / UART interfaces.Most of the ESP32 framework is implemented. Most noticeable is the missing analogWrite. While analogWrite is on it’s way, there are a few other extra options that you can use:

  • 16 channels LEDC which is PWM
    • ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits);
    • ledcWrite(uint8_t channel, uint32_t duty);
    • ledcWriteTone(uint8_t channel, double freq);
    • ledcWriteNote(uint8_t channel, note_t note, uint8_t octave);
    • ledcReadFreq(uint8_t channel);
  • 8 channels SigmaDelta which uses SigmaDelta modulation
    • channel 0-7 freq 1220-312500 duty 0-255
    • sigmaDeltaSetup(uint8_t channel, uint32_t freq);
    • sigmaDeltaWrite(uint8_t channel, uint8_t duty);
    • sigmaDeltaRead(uint8_t channel);
    • sigmaDeltaAttachPin(uint8_t pin, uint8_t channel);
    • sigmaDeltaDetachPin(uint8_t pin);
  • 2 channels DAC which gives real analog output
    • dacWrite(uint8_t pin, uint8_t value);

Installing ESP32 Board in Arduino IDE (UBUNTU Linux)

Step 1: Open Terminal and execute the following command (copy->paste and hit enter):

Step 1.1:  Allow non root user to use tty0 (USB to Serial converter) serial communication with ESP32

sudo usermod -a -G dialout $USER

Step 1.2: Install git. By default its installed with ubuntu linux installation

sudo apt-get install git

Step 1.3: Get repository for getpip.py, is a bootstrapping script that enables users to install pip, setup tools, and wheel in Python environments that don’t already have them.

wget https://bootstrap.pypa.io/get-pip.py

Step 1.4: Run python get-pip.py

sudo python get-pip.py

Step 1.5: Install pySerial is a Python API module to access the serial port. pySerial provides a uniform API across multiple operating systems, including Windows, Linux, and BSD.

sudo pip install pyserial

Step 1.6: On terminal go to you Arduino installation directory using cd command

step1-arduino-ide-esp32-board-installation

Step 1.7: Create directory espressif in arduino-1.8.3/hardware/ folder

mkdir -p ~/Arduino/hardware/espressif

Step 1.8: Change directory to espressif

cd ~/Arduino/hardware/espressif

Step 1.9: Clone esp32 core from git to esperssif directory

git clone https://github.com/espressif/arduino-esp32.git esp32

Step 1.10: After cloning you will find esp32 directory

cd esp32

Step 1.11: Update submodules of ESP32

git submodule update –init –recursive

Step 1.12: Run following final commands

cd tools
python get.py

Here is my installation Screen shot

ESP32-board-installtion-in-linux

Step 2: Restart Your arduino IDE

See in boards you will find ESP32 board

For windows installation follow these steps here https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md

One thought on “Installing ESP32 Board in Arduino IDE on Ubuntu Linux

Leave a Reply