ESP-IDF
General Information
Warning
The software ESP-IDF was developed by Espressif - the manufacturer of the ESP32 microcontrollers and is not supported by the JetHome team.
The software is under constant development, so it is recommended to see the latest current documentation on the manufacturer’s website ESP-IDF Programming Guide.
ESP-IDF (Espressif’s IoT Development Framework) is the official IoT application development environment for the ESP32 family of microcontrollers. Espressif provides basic software tools to help application developers implement their projects using ESP32 microcontrollers. Espressif’s software development environment is designed to develop Internet of Things (IoT) applications with Wi-Fi, Bluetooth, power management and other system functions.
You can also use the ESP-IDF development environment to create your own software for the JetHome E1 family of controllers and others based on the ESP32 microcontroller.
Installing
See. Installing ESP-IDF
Example of building a project to work with I2C EEPROM
A non-volatile EEPROM chip is installed on most JetHub controllers and can be used to store a variety of information, such as controller configuration.
This test example demonstrates the functions of the I2C bus and the non-volatile EEPROM chip on the I2C bus. The example allows you to test the functionality of the EEPROM chip. The program first writes data to the first and last memory block and then reads them out of the memory.
Download the source code of the example:
cd ~/esp
git clone https://github.com/nopnop2002/esp-idf-24c.git
Configure the project to work with the ESP32 microcontroller:
cd esp-idf-24c
idf.py set-target esp32
idf.py menuconfig
In menu “EEPROM configuration “, for example for processor module E1-CPU it is necessary to set the following parameters:
EEPROM MODEL = 24C64
SCL GPIO = 4
SDA GPIO = 5
I2C address of EEPROM = 0x54
Assembling and flashing the project:
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
Exit the monitor - CTRL+]
Example for I2C RTC PCF8563 operation
This test program receives time data via the NTP protocol and writes them to the RTC chip PCF8563, then reads the time data from the RTC chip.
Download the source code of the example:
cd ~/esp
git clone https://github.com/nopnop2002/esp-idf-pcf8563.git
Configure the project to work with the ESP32 microcontroller:
cd esp-idf-pcf8563
idf.py set-target esp32
idf.py menuconfig
Use the “Example Connection Configuration “ menu to set the connection parameters for your Wi-Fi network:
WiFi SSID = “Your SSID”
WiFi Password = “Your password”
Set the “PCF8563 Configuration “ menu:
PCF8563 SCL GPIO number = 4
PCF8563 SDA GPIO number = 5
Assembling and flashing the project:
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
Exit the monitor - CTRL+]
Useful Links
ESP-IDF - Espressif IoT Development Framework (ESP-IDF)
ESP-IDF Programming Guide - Documentation for ESP-IDF