Skip to main content

Part 1: Environment

1. Introduction

In this tutorial, we will learn how to perform the following essential actions:

  1. Configure the embedded environment on Espressif IDE.
  2. Flash a button service, create a Luos network and detect your service.
gif_boom

2. Set up your environment

The only two things you will need for now are an ESP32 development board and a USB cable.

caution

Remember that Luos only covers the ESP32 series, ESP32-S2, ESP32-S3 and ESP32-C3 series.

Plug the USB cable into the USB port of the board and to a computer, then clone or download the Luos engine repository.

And here we go!

Espressif IDE (only for Windows users)

  1. From the Espressif website, download the latest version of espressif IDE and follow the installation instructions.

  2. Start Espressif IDE:

luos_img
  1. Import the project in your IDE:
luos_img
  1. From the Luos engine folder you just cloned or downloaded, navigate to the folder ../examples/projects/ESP32/button. Import your project. Click on Finish.

  2. Your project is now added in the IDE:

    1. Select the target you want to build.
    2. Click on the hammer to build your project.
    3. At the end of building your project, the folders build and esp_id_component are created.
    4. A file called sdkconfig appears, containing the default configuration for our target.
luos_img
  1. Modify the file sdkconfig. By default, Usart Iram functions are not declared in the RAM. You must configure them in the RAM.

Find the line #CONFIG_UART_ISR_IN_IRAM is not set and replace it with the line CONFIG_UART_ISR_IN_IRAM=y

luos_img
luos_img
  1. Now that you have placed all the necessary parts of the code in the RAM, you need to rebuild the code:
luos_img

a. Choose your target and your USB port to upload the firmware:

luos_img

b. Be sure that it is the right project selected to be uploaded in your board.

c. Click on run application.

warning

You may need to press the reset button just before flashing your board.

You have successfully uploaded your first button service to an ESP Board! Ok, great, but what's the next step?

A button service is not really interesting by itself. On the second part, we will see how to detect it on a Luos network in order to be controlled.

The author: Thomas Salembier

CTO at Luos
Thomas Salembier

Today CTO of Luos, Thomas as a background in electronics and embedded software engineer with more than 12 years of experience in various fields of industry such as space, aeronautics, automotive and medical.

Related content