Find file History
Pull request Compare This branch is 41 commits ahead, 123 commits behind espressif:master.
Permalink
..
Failed to load latest commit information.
01_hello_world Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portT… Dec 27, 2016
02_blink Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portT… Dec 27, 2016
03_http_request Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portT… Dec 27, 2016
04_https_request Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portT… Dec 27, 2016
05_ble_adv config: Simplify WiFi & Bluetooth config options Jan 10, 2017
06_sntp deep sleep: rename header file Dec 16, 2016
06_wifi_scan examples: update the wifi scan Dec 15, 2016
07_nvs_rw_value Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portT… Dec 27, 2016
07_smartconfig examples: update the smartconfig Dec 15, 2016
08_nvs_rw_blob Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portT… Dec 27, 2016
09_adc_read examples: update the adc read Dec 15, 2016
09_dac_out examples: add the dac output Dec 15, 2016
09_onchip_sensor examples: update the onchip sensor Dec 14, 2016
09_openssl_client example/09_openssl_client: change default port to be 443 Dec 8, 2016
10_openssl_server examples/10_openssl_server: fixup SSL server with method of specific … Jan 5, 2017
10_ssd1306_hello build system: fix up the build warning message Dec 15, 2016
10_ssd1306_logo build system: fix up the build warning message Dec 15, 2016
10_ssd1306_test build system: fix up the build warning message Dec 15, 2016
11_rmt_nec_tx_rx Merge branch 'bugfix/minor_issues' into 'master' Dec 28, 2016
11_sharp_dust examples: update sharp dust Dec 15, 2016
12_blufi config: Simplify WiFi & Bluetooth config options Jan 10, 2017
12_ledc_pwm Try to add a ledc example Nov 23, 2016
13_timer_group Examples: Add READMEs for examples which did not have them Dec 22, 2016
14_gatt_server Merge branch 'feature/btdm_attr_table' into 'master' Jan 12, 2017
15_gatt_client config: Simplify WiFi & Bluetooth config options Jan 10, 2017
16_pcnt Merge branch 'bugfix/minor_issues' into 'master' Dec 28, 2016
17_ethernet ethernet: support flow control Jan 10, 2017
18_i2c 1. modify i2c_set_pin function Jan 2, 2017
19_sigmadelta Merge branch 'bugfix/minor_issues' into 'master' Dec 28, 2016
20_ext_wakeup add a example of external wakeup from deep sleep Dec 3, 2016
20_timer_wakeup examples: update timer expire wakeup Dec 15, 2016
20_uart driver: uart Dec 21, 2016
21_gpio gpio_driver: add per-pin interrupt handlers Dec 29, 2016
22_i2s Add i2s driver Dec 29, 2016
23_coap_client example: fix CI error of coap client demo Jan 7, 2017
24_coap_server example: fix CI error of coap server demo Jan 7, 2017
25_ota example: Reindex ota demo Jan 7, 2017
26_spi_master Rename SPI Master IO pins to more common terminology, add better expl… Jan 11, 2017
27_sd_card sdmmc: add peripheral driver and protocol layer Jan 8, 2017
29_ledc driver: ledc - update fading functions, add example and doc Jan 5, 2017
31_wpa2_enterprise wpa2 enterprise: add example for wpa2 enterprise Jan 11, 2017
33_gatt_server_service_table component/bt : mv demo name Jan 12, 2017
README.md Fixed broken links Nov 5, 2016

README.md

Examples

This directory contains a growing number of simple example projects for esp-idf. These are intended to show basic esp-idf functionality, and to provide you can use for your own projects.

Using Examples

Building examples is the same as building any other project:

  • Follow the setup instructions in the top-level esp-idf README.

  • Set IDF_PATH environment variable to point to the path to the esp-idf top-level directory.

  • Change into the directory of the example you'd like to build.
  • make menuconfig to configure the example. Most examples require a simple WiFi SSID & password via this configuration.
  • make to build the example.
  • Follow the printed instructions to flash, or run make flash.

Copying Examples

Each example is a standalone project. The examples do not have to be inside the esp-idf directory. You can copy an example directory to anywhere on your computer in order to make a copy that you can modify and work with.

The IDF_PATH environment variable is the only thing that connects the example to the rest of the esp-idf system.

If you're looking for a more bare-bones project to start from, try esp-idf-template.

Contributing Examples

If you have a new example you think we'd like, please consider sending it to us as a Pull Request.

Please read the esp-idf CONTRIBUTING.rst file which lays out general contribution rules.

In addition, here are some tips for creating good examples:

  • A good example is documented and the basic options can be configured.
  • A good example does not contain a lot of code. If there is a lot of generic code in the example, consider refactoring that code into a standalone component and then use the component's API in your example.
  • Examples must be licensed under the Apache License 2.0 or (preferably for examples) if possible you can declare the example to be Public Domain / Creative Commons Zero.