From ba305f53be747bd315bf19b23ccb1b419fb8a5c1 Mon Sep 17 00:00:00 2001 From: David Antliff Date: Tue, 7 Apr 2020 13:04:10 +1200 Subject: [PATCH 1/4] Update travis.yml for CMake build with IDF v3.3. --- .travis.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3161ecc..b527381 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,15 +29,13 @@ install: # Make xtensa-esp32-elf available for all terminal sessions - export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin # Get ESP-IDF from github - - git clone --recursive --branch release/v3.0 https://github.com/espressif/esp-idf.git + - git clone --recursive --branch release/v3.3 https://github.com/espressif/esp-idf.git # Set the path to ESP-IDF directory - export IDF_PATH=~/esp/esp-idf + # Install python dependencies + - pip install --user -r $IDF_PATH/requirements.txt script: - # Go back to the git repository + # Build project within the original repository - cd $PROJECT_PATH - # Update configuration so that kconfig doesn't start interactive mode - - make defconfig - # Build project from the git repository - - make - + - $IDF_PATH/tools/idf.py build From 4fb0f9c0180bbbe355903c2adc4ab81b91463c95 Mon Sep 17 00:00:00 2001 From: David Antliff Date: Tue, 7 Apr 2020 13:24:38 +1200 Subject: [PATCH 2/4] Shallow IDF submodule checkout. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b527381..f8d2123 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ install: # Make xtensa-esp32-elf available for all terminal sessions - export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin # Get ESP-IDF from github - - git clone --recursive --branch release/v3.3 https://github.com/espressif/esp-idf.git + - git clone --recursive --branch release/v3.3 --single-branch --shallow-submodules https://github.com/espressif/esp-idf.git # Set the path to ESP-IDF directory - export IDF_PATH=~/esp/esp-idf # Install python dependencies From 8d61b4153a5d16f1c3733702d03f12c53f3fbf25 Mon Sep 17 00:00:00 2001 From: David Antliff Date: Tue, 7 Apr 2020 13:33:17 +1200 Subject: [PATCH 3/4] Update travis config to use Python 3.8.1. --- .travis.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8d2123..4821e4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,6 @@ -sudo: false -language: bash -os: - - linux - -addons: - apt: - packages: - - gperf - - python - - python-serial +dist: bionic +language: python +python: "3.8" before_install: # Save path to the git respository @@ -29,11 +21,11 @@ install: # Make xtensa-esp32-elf available for all terminal sessions - export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin # Get ESP-IDF from github - - git clone --recursive --branch release/v3.3 --single-branch --shallow-submodules https://github.com/espressif/esp-idf.git + - git clone --recursive --branch v3.3 --single-branch --shallow-submodules https://github.com/espressif/esp-idf.git # Set the path to ESP-IDF directory - export IDF_PATH=~/esp/esp-idf # Install python dependencies - - pip install --user -r $IDF_PATH/requirements.txt + - pip install --requirement $IDF_PATH/requirements.txt script: # Build project within the original repository From bd9ebaa734f7f4d44b981c014314893a38a812b1 Mon Sep 17 00:00:00 2001 From: David Antliff Date: Tue, 7 Apr 2020 16:22:15 +1200 Subject: [PATCH 4/4] Update README. --- README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a9ade1c..bbba8cf 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,7 @@ This is an example application for the Maxim Integrated DS18B20 Programmable Res It supports a single or multiple devices on the same 1-Wire bus. -It is written and tested for v3.0 of the [ESP-IDF](https://github.com/espressif/esp-idf) environment, using the xtensa-esp32-elf toolchain (gcc version 5.2.0, crosstool-ng-1.22.0-80-g6c4433a). - -Support for ESP-IDF v2.1 is available on the [ESP-IDF_v2.1](https://github.com/DavidAntliff/esp32-ds18b20-example/tree/ESP-IDF_v2.1) branch. +It is written and tested for v3.3 of the [ESP-IDF](https://github.com/espressif/esp-idf) environment, using the xtensa-esp32-elf toolchain (gcc version 5.2.0, crosstool-ng-1.22.0-80-g6c4433a). Ensure that submodules are cloned: @@ -20,14 +18,9 @@ Ensure that submodules are cloned: Build the application with: $ cd esp32-ds18b20-example - $ make menuconfig # set your serial configuration and the 1-Wire GPIO - see below - $ make flash monitor - -For version 3.2 or newer of ESP-IDF, you can build with the CMake build system: - - $ $IDF_PATH/tools/idf.py menuconfig # set your serial configuration and the 1-Wire GPIO - see below - $ $IDF_PATH/tools/idf.py build - $ $IDF_PATH/tools/idf.py flash monitor + $ idf.py menuconfig # set your serial configuration and the 1-Wire GPIO - see below + $ idf.py build + $ idf.py -p (PORT) flash monitor The program should detect your connected devices and periodically obtain temperature readings from them, displaying them on the console. @@ -42,7 +35,7 @@ This application makes use of the following components (included as submodules): To run this example, connect one or more DS18B20 devices to a single GPIO on the ESP32. Use the recommended pull-up resistor of 4.7 KOhms, connected to the 3.3V supply. -`make menuconfig` can be used to set the 1-Wire GPIO. +`idf.py menuconfig` can be used to set the 1-Wire GPIO. If you have several devices and see occasional CRC errors, consider using a 2.2 kOhm pull-up resistor instead. Also consider adding decoupling capacitors between the sensor supply voltage and ground, as close to each sensor as possible.