{"id":26211475,"url":"https://github.com/tomas-fryza/esp-idf","last_synced_at":"2025-04-15T15:22:12.102Z","repository":{"id":156142585,"uuid":"567240258","full_name":"tomas-fryza/esp-idf","owner":"tomas-fryza","description":"Introductory tutorial and examples for ESP32 using ESP-IDF framework","archived":false,"fork":false,"pushed_at":"2024-05-25T08:23:59.000Z","size":3311,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T21:51:08.355Z","etag":null,"topics":["esp-idf","esp32","espressif","examples","i2c-bus","iot","platformio","wifi"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomas-fryza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-17T11:24:37.000Z","updated_at":"2025-01-29T08:45:37.000Z","dependencies_parsed_at":"2025-03-12T08:39:43.007Z","dependency_job_id":null,"html_url":"https://github.com/tomas-fryza/esp-idf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomas-fryza%2Fesp-idf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomas-fryza%2Fesp-idf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomas-fryza%2Fesp-idf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomas-fryza%2Fesp-idf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomas-fryza","download_url":"https://codeload.github.com/tomas-fryza/esp-idf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249095183,"owners_count":21211877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp-idf","esp32","espressif","examples","i2c-bus","iot","platformio","wifi"],"created_at":"2025-03-12T08:28:08.450Z","updated_at":"2025-04-15T15:22:12.062Z","avatar_url":"https://github.com/tomas-fryza.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 projects in C/C++\n\n**Espressif IDF** and **PlatformIO** extensions are popular choices for developing ESP32 projects in C/C++ using Visual Studio Code. [Espressif IDF](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/) (IoT Development Framework) is the official development framework from Espressif Systems, the manufacturer of the ESP32 microcontroller. It is a very powerful and flexible framework, but it can also be quite complex to use, especially for beginners.\n\n[PlatformIO](https://platformio.org/) is a more user-friendly alternative to the IDF. It is a build system that can manage the compilation and flashing of ESP32 projects (but also Arduino, STM32, AVR, ...), as well as providing a variety of other features, such as integrated debugging support.\n\n| Feature | Espressif IDF | PlatformIO |\n| :-- | :-- | :-- |\nOfficial framework | Yes | No\nPower and flexibility | High | Medium\nUser friendliness | Low | High\nEase of use | Low | High\nDocumentation | Good | Good\nCommunity support | Medium | Large\n\n## Installation of Espressif IDF with VS Code\n\n![logo-espressif-idf](images/logo_espressif-idf.png)\n\n1. Follow these instructions: [Installation on Linux and Windows](https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/install.md) and install Espressif IDF extension.\n\n2. It is recommended to start by an example project. See how to [create, build, and run your first project](https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/basic_use.md).\n\n  \u003e **NOTE:** Please note that all available commands are accessible in VS Code in menu **View \u003e Command Palette...** or by `Ctrl+Shift+P` shortcut, followed by a command `ESP-IDF: `\n  \u003e\n  \u003e Command | Description\n  \u003e :-- | :--\n  \u003e `F1` or `Ctrl+Shift+P` | Command Palette where all commands are found\n  \u003e `ESP-IDF: Show Examples Projects` | List of available projects\n  \u003e `ESP-IDF: New project` | Create a new project via Command Palette\n  \u003e `ESP-IDF: Set Espressif device target` | Select your Espressif target (esp32, esp32s2, etc.)\n  \u003e `ESP-IDF: Build your project` | Build the project\n  \u003e `ESP-IDF: Build, Flash, and start a monitor on your device` | Combine build, flash and serial monitor in a single command\n  \u003e |||\n  \u003e `ESP-IDF: Open ESP-IDF Terminal` | Open ESP-IDF Terminal where you can use `idf.py` command-line tool\n  \u003e `idf.py create-project NAME` | Create a new project titled `NAME` in ESP-IDF Terminal\n  \u003e `idf.py menuconfig` | Open project configuration\n  \u003e `idf.py build` | Build the project\n  \u003e `idf.py flash monitor` | Flashing esp-idf project and open serial monitor\n  \u003e `Ctrl+]` or `Ctrl+)` | Exit the monitor\n  \u003e\n  \u003e Other common [shortcuts in VS Code](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf).\n\n## Installation and usage of PlatformIO\n\n![logo-platformio](images/logo_platformio.png)\n\n1. Download and install [Visual Studio Code](https://code.visualstudio.com/) source code editor.\n\n2. Run Visual Studio Code application:\n   1. Open up the extensions viewer in menu **View \u003e Extensions Ctrl+Shift+X**.\n   2. Type `platformio` into the search bar.\n   3. Press **Install** button on the result `PlatformIO IDE`. It may take a few minutes depending on your connection speed. Do not close any window and do not open other folders until the installing process is completed.\n\n      ![Install PlatformIO IDE](images/platformio_install.png)\n\n   4. After that, restart the Visual Studio Code application.\n\n3. Create a new project:\n   1. Click on the PlatformIO icon in the left-hand margin.\n   2. In menu **PIO Home** select **Open**.\n   3. Click to **New Project** button.\n   \n      ![Create a new project](images/platformio_new_project.png)\n   \n   4. In project wizard, type `gpio` as project name.\n   5. Select ESP32 board you have.\n   6. Change framework to `Espressif IoT Development Framework` and select location to your working folder.\n   7. Click on the **Finish** button. The creation of the first project may takes a few minutes and the internet connection to download the needed libraries and frameworks is mandatory.\n\n      ![Create a new project](images/platformio_project_name.png)\n\n4. Code the application:\n   1. Copy/paste the [basic template](https://raw.githubusercontent.com/tomas-fryza/esp-idf/main/examples-platformio/gpio/src/main.c) to your `GPIO \u003e src \u003e main.c` file.\n   2. Add the following settings to `platformio.ini` project configuration file.\n\n      ```bash\n      monitor_speed = 115200\n\n      # DTR \u0026 RTS settings of the serial monitor must be OFF\n      monitor_rts = 0\n      monitor_dtr = 0\n\n      # Enable ANSI color codes in serial monitor\n      monitor_raw = yes\n      ```\n\n   3. Connect your ESP32 board to USB port. (Mac users may need to install USB drivers, such as [CH340](https://github.com/WCHSoftGroup/ch34xser_macos).)\n\n   4. Compile and upload the code. The handy shortcuts for building and uploading the code is available on the [blue footer taskbar](https://envirodiy.github.io/LearnEnviroDIY/04-GetPlatformIO/index.html). Hover over the icon to get its functionality. First, compile (build) the project and then upload it to ESP32 board. Open the Serial monitor. (At some platforms you have to press on-board reset button.)\n\n      ![PlatformIO navigation](images/platformio_navigation.png)\n\n## Examples\n\n1. For Espressif IDF\n   1. [Hello world](examples-espressif/hello_world)\n   2. [Remote control](https://gitlab.com/tbravenec/but_de2_esp32_exercises/-/tree/master/labs/01-http_led_control_ESP-IDF) of LED through HTTP server by [tbravenec](https://gitlab.com/tbravenec)\n   3. [Introduction to FreeRTOS](https://gitlab.com/tbravenec/but_de2_esp32_exercises/-/tree/master/labs/02-rtos_blink_task_ESP-IDF) using LED blinking task by [tbravenec](https://gitlab.com/tbravenec)\n\n2. For PlatformIO\n   1. [Basic template with GPIO](examples-platformio/gpio)\n   2. [Logging methods](examples-platformio/log_methods)\n   3. [Tasks](examples-platformio/tasks)\n   4. [I2C scan](examples-platformio/i2c_scan)\n   5. [I2C DHT12 sensor](examples-platformio/i2c_sensor)\n   6. [Wi-Fi APs scan](examples-platformio/wifi_scan)\n   7. [Wi-Fi GET requests to HTTP](examples-platformio/wifi_get_requests)\n   8. [Wi-Fi \u0026 DHT12 \u0026 ThingSpeak](examples-platformio/wifi_thingspeak)\n   9. [Remote control](https://gitlab.com/tbravenec/but_de2_esp32_exercises/-/tree/master/labs/01-http_led_control_PlatformIO) of LED through HTTP server by [tbravenec](https://gitlab.com/tbravenec)\n   10. [Introduction to FreeRTOS](https://gitlab.com/tbravenec/but_de2_esp32_exercises/-/tree/master/labs/02-rtos_blink_task_PlatformIO) using LED blinking task by [tbravenec](https://gitlab.com/tbravenec)\n\n### Tested on\n\n| **Version**                | **Result (yyyy-mm-dd)** | **Note**    |\n| :------------------------- | :---------------------: | :---------- |\n| Linux Mint 21.2 (Victoria) | OK (2024-01-06)         | Laptop      |\n| Windows 10                 | OK (2022-11-18)         | HomeOffice  |\n| Linux Mint 20.3 (Una)      | OK (2022-11-01)         | Laptop      |\n\n```bash\n# FYI: How to check OS version in Linux\ncat /etc/os-release\n\n# Or by Neofetch\nneofetch\n```\n\n## Useful information\n\n* [ESP32 brief overview](https://www.youtube.com/watch?v=DoctWoxIaH8) (YouTube video)\n* [Git commands](docs/README-useful-git-commands.md)\n* [ESP32-CAM board](docs/esp32-cam.md)\n* [FireBeetle board](docs/firebeetle.md)\n* [ ] ESP32 structure, versions\n\n## References\n\n1. Espressif Systems. [ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/)\n\n2. Esp32 Tutorials. [Install ESP32 ESP-IDF on Windows and Integrate with VS code](https://esp32tutorials.com/install-esp32-esp-idf-windows-integrate-vs-code/)\n\n3. [ESP32 for IoT: A Complete Guide](https://www.nabto.com/guide-to-iot-esp-32/)\n\n4. Pedro Minatel. [ESP-IDF Development Tools Guide — Part I](https://blog.espressif.com/esp-idf-development-tools-guide-part-i-89af441585b)\n\n5. Espressif Systems. [Build Your First Project](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#build-your-first-project)\n\n6. Random Nerd Tutorials. [ESP32-CAM AI-Thinker Pinout Guide: GPIOs Usage Explained](https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/)\n\n7. Renzo Mischianti. [ESP32-CAM: pinout, specs and Arduino IDE configuration – 1](https://www.mischianti.org/2021/08/30/esp32-cam-pinout-specs-and-arduino-ide-configuration-1/)\n\n8. [How To Choose The Best RTOS for IoT Devices](https://www.nabto.com/how-to-choose-best-rtos-for-iot/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomas-fryza%2Fesp-idf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomas-fryza%2Fesp-idf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomas-fryza%2Fesp-idf/lists"}