DEV Community

Stepan Vrany
Stepan Vrany

Posted on

10 2

ESP32 with Arduino CLI

A few days ago I've bought this beautiful ESP32-based development board. I selected Olimex since it was the only manufacturer with PoE boards available in my region (west Europe).

Here you can see how it looks with PoE-enabled Ethernet port connected.

And since I'm pretty new in this area I had to fight some battles to make it work with Arduino-cli. Here's some brief description of steps I had to do to successfully upload a sketch to the ESP32-POE-ISO.

Please note that I'm Mac OS user so some details are relevant only for Apple users.

Create a new sketch



arduino-cli sketch new 01
cd 01


Enter fullscreen mode Exit fullscreen mode

Also, download some sample sketches from Olimex's GitHub account.

Arduino config file arduino-cli.yaml



board_manager:
  additional_urls:
    - https://dl.espressif.com/dl/package_esp32_index.json


Enter fullscreen mode Exit fullscreen mode

Download the index



arduino-cli core update-index --config-file arduino-cli.yaml


Enter fullscreen mode Exit fullscreen mode

Install the ESP32 core



arduino-cli core install esp32:esp32


Enter fullscreen mode Exit fullscreen mode

List the boards



arduino-cli board list


Enter fullscreen mode Exit fullscreen mode

sample output:



Port Type Board Name FQBN Core
/dev/cu.Bluetooth-Incoming-Port Serial Port Unknown

/dev/cu.debug-console Serial Port Unknown

/dev/cu.usbmodem009NTNHF15512 Serial Port Unknown

/dev/cu.usbserial-1310 Serial Port Unknown

/dev/cu.wlan-debug Serial Port Unknown

Enter fullscreen mode Exit fullscreen mode




Try to compile the sketch




arduino-cli compile --fqbn esp32:esp32:esp32-poe-iso .

Enter fullscreen mode Exit fullscreen mode




Try to upload the sketch




arduino-cli upload -p /dev/cu.usbserial-1310 --fqbn esp32:esp32:esp32-poe-iso .

Enter fullscreen mode Exit fullscreen mode




Monitor the serial output




screen /dev/cu.usbserial-1310 115200

Enter fullscreen mode Exit fullscreen mode




Result

After 30 - 40 minutes I was able to start with some basic development. Board is now connected to the Ethernet and it obtained an IPv4 address from my DHCP server.

Well, it was easier than I originally thought. Can't wait to test some more complex stuff!

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
sbotting profile image
Simon B

Thank you for posting this, really helped me

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more