Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temperature and Humidity II

GitHub

GitHub code size GitHub repo size GitHub commit activity GitHub issues GitHub closed issues

This is a small ESP32 application displaying real-time temperature and relative humidity information on a 4-digit 7 segment display. The applied temperature and humidity sensor is DHT22, The 4-digit 7 segment display is TM1637. The application is based on ESP32Basic lightweight framework (i.e., it does not depend on ESP-IDF).

Note, both projects (esp32basic and this one) are in development phase, and the version-dependency is not set yet.

Hardware setup

The required components, wiring, etc. are described in src/README.md.

Software Installation

Get the source

Either clone the git source or download and extract the zip. Cloning git source is preferred. It is easier to update.

Autotools preparation

First, you need to run aclocal.

Next, run autoheader and autoconf.

Finally, run automake --add-missing.

aclocal
autoheader
autoconf
automake --add-missing

Configure & Install

The INSTALL file describes the general way of the installation of an automake project.

Here, we present the specialities, so the

./configure
make
make install

command sequence is slightly modified.

  • Usually, it is a good idea to do VPATH Builds. We encourage you to create at least a performance build in dist/perf (with -O2 compiler option) and a debug build in dist/debug (with -O0 -g compiler options).

  • As the target platform is ESP32, we have to use the xtensa-elf-esp toolchain. In order to use the xtensa-esp-elf toolchain, you have to call the configure script with option --host=xtensa-esp32-elf. Also set option host_alias=xtensa-esp32-elf. Further reading: online manual.

  • This project depends on esp32basic (libs and headers). You have to specify the installation location of esp32basic: --with-e32bdir=PATH_TO_ESP32BASIC_INSTALLATION.

  • Currently, some commonly used compiler options are not configured automatically. Thus you have to configure them manually (define in CFLAGS for the configure script): -Werror -nostdlib -mlongcalls -std=c11 -flto

My performance VPATH build configuration 'script' looks like this:

 mkdir -p dist/perf
 cd dist/perf
 ../../configure --host=xtensa-esp32-elf 'CFLAGS=-O2 -Wall -Werror -nostdlib -mlongcalls -std=c11 -flto' host_alias=xtensa-esp32-elf --with-e32bdir=/home/szigeti/local/esp32

Build is started by command

 make

within dist/perf. If everything goes well, it produces src/temphum.bin relative to dist/perf.

If your ESP32 is bound with UART ↔ USB adapter, e.g., CP2102, like in NodeMCU-ESP32S, installation is simple via USB port. To install (i.e., write the binary to the ESP32 board) via USB, you can use scripts/flash.sh:

 ../../scripts/flash.sh src/temphum.bin

About

ESP32 application for measuring temperature and relative humidity (DHT22) and displaying measurement results (TM1637)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages