diff --git a/esp/cpp/07_lcd-panel/.gitignore b/esp/cpp/07_lcd-panel-i2c/.gitignore similarity index 100% rename from esp/cpp/07_lcd-panel/.gitignore rename to esp/cpp/07_lcd-panel-i2c/.gitignore diff --git a/esp/cpp/07_lcd-panel/CMakeLists.txt b/esp/cpp/07_lcd-panel-i2c/CMakeLists.txt similarity index 85% rename from esp/cpp/07_lcd-panel/CMakeLists.txt rename to esp/cpp/07_lcd-panel-i2c/CMakeLists.txt index d70f297..e923c1f 100644 --- a/esp/cpp/07_lcd-panel/CMakeLists.txt +++ b/esp/cpp/07_lcd-panel-i2c/CMakeLists.txt @@ -7,9 +7,9 @@ cmake_minimum_required(VERSION 3.26) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project( - #[[NAME]] lcd-panel + #[[NAME]] lcd-panel-i2c VERSION 0.1 - DESCRIPTION "Example of using the SSD1306 LCD display with ESP-IDF and LVGL" + DESCRIPTION "Using the SSD1306 LCD display with ESP-IDF and LVGL over I2C" LANGUAGES CXX ) # For writing pure cmake components, see the documentation diff --git a/esp/cpp/07_lcd-panel-i2c/README.md b/esp/cpp/07_lcd-panel-i2c/README.md new file mode 100644 index 0000000..be21e9a --- /dev/null +++ b/esp/cpp/07_lcd-panel-i2c/README.md @@ -0,0 +1,29 @@ +# 07_lcd-panel-i2c + +Using the ESP IDF for drawing to a LCD screen over I2C. + +For instructions on setting up the ESP-IDF see [04_-esp-idf-arduino](./../04_esp-idf-arduino) + +[ESP IDF - I2C](https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/api-reference/peripherals/i2c.html) + +[ESP IDF - LCD](https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/api-reference/peripherals/lcd/index.html) + +[ESP IDF - FreeRTOS](https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/api-reference/system/freertos.html) + +![schematic](./schematic.png) + +Temperature and humidity sensor served on a web page within the local network. + +![example](./example.gif) + +To build this example run the following commands. + +```bash +source ~/path/to/esp-idf/export.sh + +mkdir build +cd build +cmake .. +make -j $(nproc) +make flash +``` diff --git a/esp/cpp/07_lcd-panel-i2c/example.gif b/esp/cpp/07_lcd-panel-i2c/example.gif new file mode 100644 index 0000000..f9e44f5 Binary files /dev/null and b/esp/cpp/07_lcd-panel-i2c/example.gif differ diff --git a/esp/cpp/07_lcd-panel/main/CMakeLists.txt b/esp/cpp/07_lcd-panel-i2c/main/CMakeLists.txt similarity index 100% rename from esp/cpp/07_lcd-panel/main/CMakeLists.txt rename to esp/cpp/07_lcd-panel-i2c/main/CMakeLists.txt diff --git a/esp/cpp/07_lcd-panel/main/display.cpp b/esp/cpp/07_lcd-panel-i2c/main/display.cpp similarity index 100% rename from esp/cpp/07_lcd-panel/main/display.cpp rename to esp/cpp/07_lcd-panel-i2c/main/display.cpp diff --git a/esp/cpp/07_lcd-panel/main/display.h b/esp/cpp/07_lcd-panel-i2c/main/display.h similarity index 100% rename from esp/cpp/07_lcd-panel/main/display.h rename to esp/cpp/07_lcd-panel-i2c/main/display.h diff --git a/esp/cpp/07_lcd-panel/main/i2c.h b/esp/cpp/07_lcd-panel-i2c/main/i2c.h similarity index 100% rename from esp/cpp/07_lcd-panel/main/i2c.h rename to esp/cpp/07_lcd-panel-i2c/main/i2c.h diff --git a/esp/cpp/07_lcd-panel/main/idf_component.yml b/esp/cpp/07_lcd-panel-i2c/main/idf_component.yml similarity index 100% rename from esp/cpp/07_lcd-panel/main/idf_component.yml rename to esp/cpp/07_lcd-panel-i2c/main/idf_component.yml diff --git a/esp/cpp/07_lcd-panel/main/main.cpp b/esp/cpp/07_lcd-panel-i2c/main/main.cpp similarity index 100% rename from esp/cpp/07_lcd-panel/main/main.cpp rename to esp/cpp/07_lcd-panel-i2c/main/main.cpp diff --git a/esp/cpp/07_lcd-panel/main/panel.h b/esp/cpp/07_lcd-panel-i2c/main/panel.h similarity index 100% rename from esp/cpp/07_lcd-panel/main/panel.h rename to esp/cpp/07_lcd-panel-i2c/main/panel.h diff --git a/esp/cpp/07_lcd-panel/main/panel_device.h b/esp/cpp/07_lcd-panel-i2c/main/panel_device.h similarity index 100% rename from esp/cpp/07_lcd-panel/main/panel_device.h rename to esp/cpp/07_lcd-panel-i2c/main/panel_device.h diff --git a/esp/cpp/07_lcd-panel/main/ssd1306.cpp b/esp/cpp/07_lcd-panel-i2c/main/ssd1306.cpp similarity index 100% rename from esp/cpp/07_lcd-panel/main/ssd1306.cpp rename to esp/cpp/07_lcd-panel-i2c/main/ssd1306.cpp diff --git a/esp/cpp/07_lcd-panel/main/ssd1306.h b/esp/cpp/07_lcd-panel-i2c/main/ssd1306.h similarity index 100% rename from esp/cpp/07_lcd-panel/main/ssd1306.h rename to esp/cpp/07_lcd-panel-i2c/main/ssd1306.h diff --git a/esp/cpp/07_lcd-panel/main/time_keeper.h b/esp/cpp/07_lcd-panel-i2c/main/time_keeper.h similarity index 100% rename from esp/cpp/07_lcd-panel/main/time_keeper.h rename to esp/cpp/07_lcd-panel-i2c/main/time_keeper.h diff --git a/esp/cpp/07_lcd-panel/schematic.png b/esp/cpp/07_lcd-panel-i2c/schematic.png similarity index 100% rename from esp/cpp/07_lcd-panel/schematic.png rename to esp/cpp/07_lcd-panel-i2c/schematic.png diff --git a/esp/cpp/07_lcd-panel/sdkconfig b/esp/cpp/07_lcd-panel-i2c/sdkconfig similarity index 100% rename from esp/cpp/07_lcd-panel/sdkconfig rename to esp/cpp/07_lcd-panel-i2c/sdkconfig diff --git a/esp/cpp/07_lcd-panel/README.md b/esp/cpp/07_lcd-panel/README.md deleted file mode 100644 index 17b8be8..0000000 --- a/esp/cpp/07_lcd-panel/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# 06_lcd-panel - -This example is largely adapted from those in [ESP32-basic-starter-kit.pdf](./ESP32-basic-starter-kit.pdf). - -The APIs in the original examples paired with this PDF have changed, and I decided to do some different things with the code and/or circuits, but the original code can be [found here](https://www.dropbox.com/scl/fo/6znlij3eb23ih4jxcpv2w/AKvB1t9CCUgoVRVtGen8Yrw?rlkey=z84anl0hs940qf9fpl7l8q8q2&e=1&dl=0). - -This is the same example in [03_temp-humidity-web](./../03_temp-humidity-web), ported to the cmake ESP-IDF build system. - -For instructions on setting up the ESP-IDF see [04_-esp-idf-arduino](./../04_esp-idf-arduino) - -This example is largely adapted from those in [ESP32-basic-starter-kit.pdf](./ESP32-basic-starter-kit.pdf). - -The APIs in the original examples paired with this PDF have changed, and I decided to do some different things with the code and/or circuits, but the original code can be [found here](https://www.dropbox.com/scl/fo/6znlij3eb23ih4jxcpv2w/AKvB1t9CCUgoVRVtGen8Yrw?rlkey=z84anl0hs940qf9fpl7l8q8q2&e=1&dl=0). - -![schematic](./schematic.png) - -Temperature and humidity sensor served on a web page within the local network. - -![screenshot](./screenshot.png) - -To build this example run the following commands. - -```bash -source ~/path/to/esp-idf/export.sh - -mkdir build -cd build -cmake .. -make -j $(nproc) -make flash -``` - -[ESP-IDF I2C documentation](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/i2c.html) \ No newline at end of file