Aws Esp32
Aws Esp32
devices. This report presents an overview of a project that tates communication using the MQTT protocol, providing
leverages the Arduino IDE, alongside the AWS IoT service, to a robust solution for IoT devices to publish and subscribe
program and connect an ESP32 microcontroller to the cloud. to messages.
This endeavor not only exemplifies the integration of cloud • esp32 by Espressif Systems (Version 2.0.14): A requi-
computing with embedded systems but also showcases the site library for programming the ESP32, it contains all
practical implementation of IoT concepts. Our work demon- the necessary drivers and functions for the development
strates the process of enabling communication between the board.
ESP32 module and AWS IoT, thereby illustrating the conver- To incorporate these libraries, access the Arduino IDE,
gence of the digital and physical domains in a professional navigate to ‘Sketch ¿ Include Library ¿ Manage Libraries...‘,
context. and execute a search for each library listed. Upon locating the
desired library, select it and proceed by clicking the ”Install”
OVERVIEW OF THE A RDUINO S OFTWARE (IDE) button to acquire the specified version.
The Arduino Software IDE, provided open-source by Ar-
Extending Arduino IDE with Additional Boards
duino.cc, is an essential tool for coding, compiling, and
uploading projects to Arduino devices. Its Java-based en- The Arduino IDE’s capabilities can be enhanced by adding
vironment supports cross-platform functionality for MAC, new boards through their respective Board Manager URLs.
Windows, and Linux. The IDE is celebrated for its user- This feature is particularly beneficial for incorporating boards
friendly interface, which simplifies the programming process such as the ESP32 and ESP8266, which are not present in the
for beginners and experienced users alike. It is particularly IDE’s default configuration.
advantageous for offline project development where internet • The Board Manager URL for the ESP32
access is scarce, supporting both C and C++ languages. is: https://raw.githubusercontent.com/espressif/
Within the IDE, the coding workflow is efficient and arduino-esp32/gh-pages/package esp32 index.json
straightforward, involving a text editor for writing sketches, a • For the ESP8266, the corresponding URL
compiler for code translation, and a seamless mechanism for is: http://arduino.esp8266.com/stable/package
uploading to various Arduino modules. A distinctive feature esp8266com index.json
set, including a menu bar, output pane, and debugging tools To add these board configurations to the Arduino IDE, one
like the Serial Monitor, enhances the development experience. should:
The availability of two versions, IDE 1.x.x and the more 1) Launch the Arduino IDE and go to the ”Preferences”
advanced IDE 2.x, offers users a choice between traditional window.
functionality and newer features such as autocompletion and 2) Locate the ”Additional Boards Manager URLs” input
an integrated debugger, with both versions maintaining a con- field.
sistent process for code management and device interaction. 3) Insert the URLs, ensuring each URL occupies its own
line.
R EQUIRED L IBRARIES FOR P ROJECT S ETUP
4) Confirm the changes by clicking ”OK” and closing the
The project necessitates the integration of several libraries, Preferences window.
each facilitating a unique aspect of the device’s functionality:
AWS
• DHT sensor library by Adafruit (Version 1.4.6): Es-
sential for interfacing with DHT11 and DHT22 sensors, IoT Thing
this library simplifies reading temperature and humidity AWS IoT Core enables the creation of ”Things” which
data on Arduino platforms. symbolize physical devices in the cloud. These Things are
uniquely identified within AWS IoT Core and have attributes
for effective device management.
1) Access the AWS Management Console and go to the
AWS IoT Core service section.
2) From the AWS IoT Core dashboard, select ”Manage”
followed by ”Things”.
3) Initiate a new Thing creation by clicking ”Create
things”.
4) Assign a distinctive name to your Thing, for instance,
‘ESP PRUEBA‘, and fill out the necessary details.
5) If desired, define attributes for your Thing, like device
type or model number, using key-value pairs for en-
hanced management.
6) Finalize the Thing’s details and save to establish it within
AWS IoT Core.
7) Secure your Thing by attaching the appropriate certifi-
cates and policies for trusted device communication.
Fig. 2. Setup of connection parameters in secrets.h