Real-Time Operating Systems (RTOS) and their applications
■ Users that don’t have embedded programming experience should ‘flash’ MicroPython onto the ESP32 so that the application code can be written in the easy to learn Python scripting language ■ For the application, search the Internet for ESP32 examples and libraries to accelerate application development and integration (there are a lot of great examples already available) ■ In the design, make sure that the boot strapping pins are able to be used to boot into the update mode. This will make it very easy to update firmware in the field ■ Developers that follow these ‘tips and tricks’ will find that they can save quite a bit of time and grief when working with ESP32 for the first time.
using MicroPython.
experienced embedded software developers. The toolchain includes several useful pieces such as an IDE to develop the application, a compiler, libraries, and examples. The IDF uses FreeRTOS as the base real-time operating system (RTOS) along with the lwIP TCP/IP stack and TLS 1.2 for Wi-Fi. For developers who have minimal programming experience, the popular Arduino IDE can also be used to develop an application and deploy it to the ESP32. While the Arduino IDE is a bit slower and clunkier than a professional development environment, it offers a lot of examples and support for the ESP32, which can make development for a newbie much easier.
Finally, for developers who are interested in developing their application in Python, the ESP32 is supported by the open source MicroPython kernel. Developers can load MicroPython onto the ESP32 and then develop Python scripts for their application. This can make it very easy to update the application on-the-fly in an industrial setting and remove layers of required expertise that normally come with embedded development. Tips and tricks for working with ESP32 Getting started with ESP32 is not difficult, and a search of the web will provide detailed descriptions of how to set up the various software environments. That said, there are many nuances and decisions required of developers working with ESP32 for the first time. Here are a few ‘tips and tricks’ for getting started: ■ Carefully identify and configure a module’s boot pins – MTDI, GPIO0, GPIO2, MTDO and GPIO5 – to load an application from the correct memory source (internal flash, QSPI, Download, Enable/ Disable debug messages) ■ Set the serial output baud rate to the same baud rate as the ESP32 boot firmware baud rate. This will allow monitoring of the ESP32 boot messages, and the application debug messages, without reconfiguring the baud rate
ESP32 – a series of low-cost, low-power system-on-a-chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth – is a breakthrough for automation engineers who don’t want to get caught up in the nuances of radio frequency (RF) and wireless design.
All told, ESP32 is an excellent choice for connecting industrial automation equipment quickly and efficiently.
that there are several different development environments to choose from to develop and program the device. The most popular development tools include: ■ The Espressif IoT Development Framework (IDF)
Once a designer has decided which module and development board best fit their application, they need to spend some time looking at the development environment for the ESP32 that best fits their needs.
■ Arduino IDE ■ MicroPython
Selecting an ESP32 development environment
The first environment, the Espressif IDF, is a development toolchain for
The ESP32 has become so popular
E2PROM
32.768KHz crystal
Conclusion
12MHz
As shown, ESP32 has several different modules and development boards that developers can leverage to begin designing their industrial IoT application. The advantage of using ESP32 for this purpose is that it simplifies development by removing the need to understand RF circuitry and to certify the wireless receiver. ESP32 is also widely supported, not just by the module manufacturer but also within professional and hobbyist circles. Developers who are not familiar with embedded software can easily use the Arduino IDE or program their wireless application
I/O expand
JTAG
ChannelA
JTAG
LCD: 3.2 inch
D+/D-
USB Connector
FT2232HL
ESP32_Module
Camera
UART
ChannelB
UART
MicroSD
RGB LED
USB_5V
+3.3V
LDO: +5V->+3.3V
EXT_5V
Key1
Key2
Figure 6. The Espressif ESP-WROVER-KIT board provides industrial automation developers with an ESP32 module that has access to an RGB LED, microSD slot, camera, an LCD, and easily accessible I/O expansion. Credit: Espressif Systems
we get technical
22
23
Powered by FlippingBook