From 07717003cfb6ee5ada23310babf552a9de3d7f2e Mon Sep 17 00:00:00 2001 From: William Emfinger Date: Sun, 4 Jun 2023 15:41:06 -0500 Subject: [PATCH] doc: update * Removed template readmes for examples and replaced with short descriptions and instructions closes #61 --- components/adc/example/README.md | 59 +++---------- components/ads1x15/example/README.md | 52 ++--------- components/as5600/example/README.md | 59 +++++-------- components/aw9523/example/README.md | 53 +++--------- components/bldc_haptics/example/README.md | 91 +++++++++++++------- components/bldc_motor/example/README.md | 69 +++++++++------ components/cli/example/README.md | 56 +++--------- components/color/example/README.md | 53 ++---------- components/controller/example/README.md | 61 +++---------- components/csv/example/README.md | 49 +---------- components/display_drivers/example/README.md | 55 ++++-------- components/drv2605/example/README.md | 54 +++--------- components/encoder/example/README.md | 54 ++---------- components/event_manager/example/README.md | 53 ++---------- components/file_system/example/README.md | 53 ++---------- components/filters/example/README.md | 52 ++--------- components/ftp/example/README.md | 46 ++-------- components/joystick/example/README.md | 50 ++--------- components/led/example/README.md | 51 ++--------- components/led_strip/example/README.md | 49 ++--------- components/logger/example/README.md | 51 +---------- components/math/example/README.md | 51 +---------- components/mcp23x17/example/README.md | 51 ++--------- components/monitor/example/README.md | 47 ++-------- components/mt6701/example/README.md | 59 ++++--------- components/pid/example/README.md | 52 ++--------- components/rmt/example/README.md | 50 ++--------- components/rtsp/example/README.md | 55 +++++------- components/serialization/example/README.md | 54 +----------- components/socket/example/README.md | 52 ++--------- components/st25dv/example/README.md | 56 +++--------- components/state_machine/example/README.md | 56 +++--------- components/task/example/README.md | 54 +----------- components/wifi/example/README.md | 50 ++--------- 34 files changed, 384 insertions(+), 1473 deletions(-) diff --git a/components/adc/example/README.md b/components/adc/example/README.md index ffe0beb9d..c7651c355 100644 --- a/components/adc/example/README.md +++ b/components/adc/example/README.md @@ -1,36 +1,19 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# ADC Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows the use of the `espp::OneshotAdc` and the `espp::ContinuousAdc` components. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ +It uses the following components: +* `adc` +* `task` -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +These adc components can be used to read analog values using the ESP's built-in +ADC hardware, supporting DMA and filtering as well. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +You can build and run this example on any esp dev board, such as the QtPy ESP32 +series, the TinyPICO / TinyS3 boards, the WROVER-DevKit, and the ESP32-S3-BOX. +Make sure to set the idf target when building the example. ### Build and Flash @@ -43,25 +26,3 @@ idf.py -p PORT flash monitor (Replace PORT with the name of the serial port to use.) (To exit the serial monitor, type ``Ctrl-]``.) - -See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. - -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/ads1x15/example/README.md b/components/ads1x15/example/README.md index ffe0beb9d..1419b00bc 100644 --- a/components/ads1x15/example/README.md +++ b/components/ads1x15/example/README.md @@ -1,37 +1,13 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Ads1x15 Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows the use of the `Ads1x15` component to communicate with an +ADS1015 I2C analog to digital converter using the I2C peripheral of the ESP32. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +It uses the `task` component to periodically read two channels of analog data +from the ADS1015 and print them in CSV format using the `format` component. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +24,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![example_output](https://user-images.githubusercontent.com/213467/225378943-a1aabb6a-c12c-4c91-9fcc-9e2d76555e3e.png) diff --git a/components/as5600/example/README.md b/components/as5600/example/README.md index ffe0beb9d..b2e7d898b 100644 --- a/components/as5600/example/README.md +++ b/components/as5600/example/README.md @@ -1,36 +1,26 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +| Supported Targets | ESP32-S3 | +|-------------------|----------| -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example currently uses GPIO 40 and 41 as the I2C lines, so it only supports +ESP32-S3. If you wish to use a different chip / board, changes those and rebuild. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ +# As5600 Example -(See the README.md file in the upper level 'examples' directory for more information about examples.) +This example shows the use of the `As5600` component to communicate with an +AS5600 I2C magnetic encoder chip. -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +It uses the `task` component to periodically read the raw count, position, and +velocity of the encoder, the `filters` component (specifically the +`espp::ButterworthFilter` class) to filter the raw values from the sensor, and +the `format` component to print the data to the console in CSV format. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This requires a AS5600 magnetic encoder dev board with an diametric magnet and +the AS5600 dev board should be connected to the ESP dev board you choose via +I2C. ### Build and Flash @@ -48,20 +38,11 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +Here is some example output plotted using the [uart serial +plotter](https://github.com/appliedinnovation/uart_serial_plotter): -## Example Breakdown +![example output +plotted](https://user-images.githubusercontent.com/213467/205207680-25a4fa41-bc31-4f5e-bc69-c5e2a026d710.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +For more information, see the original PR that included this component: +https://github.com/esp-cpp/espp/pull/5 diff --git a/components/aw9523/example/README.md b/components/aw9523/example/README.md index ffe0beb9d..8b60a9b68 100644 --- a/components/aw9523/example/README.md +++ b/components/aw9523/example/README.md @@ -1,36 +1,19 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# AW9523 Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows how to use the `Aw9523` component to communicate (via I2C) +with an AW9523 I2C digital IO expander and LED driver. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +It is currently designed to run on an ESP32-S3, but (by changing the I2C pin +definitions in the main file) can be reconfigured to run on any of the ESP32 +chips. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example requires a connection (via I2C) to a dev board which has an AW9523. +To that chip should be attached some digial inputs (such as buttons) as well as +an RGB LED. ### Build and Flash @@ -48,20 +31,8 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +![example output](https://user-images.githubusercontent.com/213467/225363770-77a52ba7-c8ad-4c12-a416-f9718eca3db2.png) -## Example Breakdown +An example video: -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +https://user-images.githubusercontent.com/213467/225365600-5ad600e9-68d6-4ddc-96d6-f56b72ec1a0e.mp4 diff --git a/components/bldc_haptics/example/README.md b/components/bldc_haptics/example/README.md index ffe0beb9d..801c0cdfe 100644 --- a/components/bldc_haptics/example/README.md +++ b/components/bldc_haptics/example/README.md @@ -1,36 +1,26 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# BLDC Haptics Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `BldcHaptics` component to drive a BLDC motor +(such as a tiny gimbal motor) as a user input / output device that provides +haptic feedback (such as might be used as a rotary encoder input). ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ +This example requires a lot of hardware such as: +* Magnetic encoder chip (this example uses `Mt6701`) +* BLDC Motor Driver chip (this example was tested with the `TMC6300 BOB` dev board) +* Some mounting hardware to mount the motor, magnet, encoder, etc. -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ +:warning: +> NOTE: you MUST make sure that you run the example with the +> `zero_electrical_offset` value set to 0 (or not provided) at least once +> otherwise the sample will not work and could potentially damage your motor. -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +Currently, this is designed to be run on a `TinyS3` connected to the motor +driver and encoder via breadboard with the motor powered via a benchtop power +supply at 5V. ### Build and Flash @@ -48,20 +38,55 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ +This example can be re-run (by modifying the code to change the selected +`DetentConfig` from one of the predefined configurations or by making your own) +to produce various behaviors. Additionally, at the end of each demo, it will +play a haptic buzz / click using the motor. -``` -Use this style for pasting the log. -``` +For more information, see the documentation or the original PR: +https://github.com/esp-cpp/espp/pull/60 + +Some examples: + +### coarse values strong detents (best with sound) + +https://github.com/esp-cpp/espp/assets/213467/a256b401-6e45-4284-89c7-2dec9a49daa7 + +### magnetic detents (best with sound) + +https://github.com/esp-cpp/espp/assets/213467/ab1ace5c-f967-4cfc-b304-7736fdb35bcb -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ +### On / Off Strong Detents (best with sound) -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ +https://github.com/esp-cpp/espp/assets/213467/038d79b1-7cd9-4af9-b7e8-1b4daf6a363a + +### Multi-rev no detents + +https://github.com/esp-cpp/espp/assets/213467/2af81edb-67b8-488b-ae7a-3549be36b8cc ## Troubleshooting -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +Make sure to run the example once with `zero_electrical_offset` set to 0 so that +the motor will go through a calibration / zero offset routine. At the end of +this startup routine it will print the measured zero electrical offset that you +can then provide within the code, at which point it will not need to run the +calibration routine. + +You must run this calibration any time you change your hardware configuration +(such as by remounting your motor, magnet, encoder chip). ## Example Breakdown -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +This example is relatively complex, but builds complex haptic behavior using the +following components: + +* `espp::Mt6701` +* `espp::BldcDriver` +* `espp::BldcMotor` +* `espp::BldcHaptics` +* ESP-IDF's `i2c` peripheral driver + +You combine the `Mt6701` and `BldcDriver` together when creating the `BldcMotor` +and then simply pass the `BldcMotor` to the `BldcHaptics` component. At that +point, you only have to interface to the `BldcHaptics` to read the input +position or reconfigure the haptics. diff --git a/components/bldc_motor/example/README.md b/components/bldc_motor/example/README.md index ffe0beb9d..524221207 100644 --- a/components/bldc_motor/example/README.md +++ b/components/bldc_motor/example/README.md @@ -1,28 +1,27 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# BldcMotor Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `BldcMotor` component to drive a BLDC motor +(such as a tiny gimbal motor) using Field-Oriented Control (FOC) in both +open-loop and closed-loop control schemes for both position and velocity +control. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ +This example requires a lot of hardware such as: +* Magnetic encoder chip (this example uses `Mt6701`) +* BLDC Motor Driver chip (this example was tested with the `TMC6300 BOB` dev board) +* Some mounting hardware to mount the motor, magnet, encoder, etc. -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ +:warning: +> NOTE: you MUST make sure that you run the example with the +> `zero_electrical_offset` value set to 0 (or not provided) at least once +> otherwise the sample will not work and could potentially damage your motor. + +Currently, this is designed to be run on a `TinyS3` connected to the motor +driver and encoder via breadboard with the motor powered via a benchtop power +supply at 5V. ### Configure the project @@ -48,20 +47,38 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ +### Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures): +![image](https://github.com/esp-cpp/espp/assets/213467/600fe5f4-9edb-46c3-9a6c-d35242cf1597) +![image](https://github.com/esp-cpp/espp/assets/213467/5a39bec2-9490-47dd-b5ca-74e9919a123f) -``` -Use this style for pasting the log. -``` -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ +### Video -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ +https://github.com/esp-cpp/espp/assets/213467/9a48a29f-9901-44d2-a68e-b27c9220cc24 ## Troubleshooting -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +Make sure to run the example once with `zero_electrical_offset` set to 0 so that +the motor will go through a calibration / zero offset routine. At the end of +this startup routine it will print the measured zero electrical offset that you +can then provide within the code, at which point it will not need to run the +calibration routine. + +You must run this calibration any time you change your hardware configuration +(such as by remounting your motor, magnet, encoder chip). ## Example Breakdown -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +This example is relatively complex, but builds bldc motor control using the +following components: + +* `espp::Mt6701` +* `espp::BldcDriver` +* `espp::BldcMotor` +* ESP-IDF's `i2c` peripheral driver +* `espp::Task` for updating the target +* `espp::Task` for logging state + +You combine the `Mt6701` and `BldcDriver` together when creating the `BldcMotor` +and then simply use the API provided by the `BldcMotor` to set targets for +control (position or velocity) and to get the state of the motor. diff --git a/components/cli/example/README.md b/components/cli/example/README.md index ffe0beb9d..43e9967b3 100644 --- a/components/cli/example/README.md +++ b/components/cli/example/README.md @@ -1,37 +1,17 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Cli Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows how to use the `Cli` component to setup and run a command +line interface (CLI) on the ESP. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +The `Cli` and associated `LineInput` classes support: + * ctrl+a (move to beginning of line) + * ctrl+e (move to end of line) + * ctrl+n (move up a line / previous input history) + * ctrl+p (move down a line / next input history) + * ctrl+k (delete from the cursor to the end of the line) ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +28,6 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +![output](https://user-images.githubusercontent.com/213467/231225408-90881f56-901a-4d7f-9649-1ddd4d3ea560.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +https://user-images.githubusercontent.com/213467/231188170-47f45641-fc44-4cc6-b673-506e643a5e02.mp4 diff --git a/components/color/example/README.md b/components/color/example/README.md index ffe0beb9d..2482a55a5 100644 --- a/components/color/example/README.md +++ b/components/color/example/README.md @@ -1,37 +1,14 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Color Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows how to use the various classes exposed in the `color` +component to manipulate and convert between color data. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +The classes provided are: +* `espp::Rgb` +* `espp::Hsv` ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +25,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/230202843-e52b7eec-15bb-4552-bb72-2b074dbdb2ca.png) diff --git a/components/controller/example/README.md b/components/controller/example/README.md index ffe0beb9d..f19c3de2e 100644 --- a/components/controller/example/README.md +++ b/components/controller/example/README.md @@ -1,36 +1,23 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Controller Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows how to use the `Controller` component to create various +different controller interface objects, such as: +* Digital input only controller (using the `DigitalConfig`) with only a couple of buttons (such as NES) +* Analog and digital controller (with 1 joystick that has x/y axes) using the `espp::OneshotAdc` class with the Joystick +* Analog controller with 2 joysticks using the `espp::Ads1x15` component to read 4 analog axes over I2C. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ +NOTE: this example cannot be run as-is. It's designed to be illustrative and to +check various interfaces. To run the example, you should comment out / remove +the code for all tests except the one you wish to run. -### Configure the project - -``` -idf.py menuconfig -``` +### Hardware Required -* _If there is any project configuration that the user must set for this example, mention this here._ +You may require analog inputs (raw) or an analog expander (ADS1015) if you want +to run those parts of the example. This was tested with the SparkFun Gamepad +Arduino Shield (for the raw input), and the Adafruit Controller PiHat (for the +Ads1015 test). ### Build and Flash @@ -45,23 +32,3 @@ idf.py -p PORT flash monitor (To exit the serial monitor, type ``Ctrl-]``.) See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. - -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/csv/example/README.md b/components/csv/example/README.md index ffe0beb9d..d42fdd2d6 100644 --- a/components/csv/example/README.md +++ b/components/csv/example/README.md @@ -1,37 +1,9 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# CSV Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `csv` component to read and write CSV data. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +20,5 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +![output](https://user-images.githubusercontent.com/213467/228974953-4ec7bc85-4fe2-44c3-955d-0b179f02ba7b.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/display_drivers/example/README.md b/components/display_drivers/example/README.md index ffe0beb9d..955f9cc10 100644 --- a/components/display_drivers/example/README.md +++ b/components/display_drivers/example/README.md @@ -1,28 +1,17 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Display Drivers Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example is designed to show how the `display_drivers` component can be used +to drive various different displays with LVGL and a simple GUI (that is +contained within the example: `main/gui.hpp`). ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ +This example can be configured to run on the following dev boards: +* ESP32-WROVER-Kit +* TTGO T-Display +* ESP32-S3-BOX ### Configure the project @@ -30,7 +19,9 @@ _If any other items (server, BLE device, app, second chip, whatever) are needed, idf.py menuconfig ``` -* _If there is any project configuration that the user must set for this example, mention this here._ +When configuring the project, select the `Display Drivers Example Configuration` +value that matches the board you've selected (must be one of the 3 boards +mentioned above.) ### Build and Flash @@ -46,22 +37,12 @@ idf.py -p PORT flash monitor See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - ## Example Breakdown -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +The example has the following functionality: +* SPI pre and post transfer callbacks for handling the data/command (DC_LEVEL) + GPIO for the screens and the lvgl flush flag management +* `lcd_write` for polling (blocking) transmit example +* `lcd_send_lines` and `lcd_wait_lines` for queued (non-blocking) transmit example +* `Gui` class (contained in `main/gui.hpp`) which encapsulates some very basic + LVGL components into an object that manages gui update task and synchronization. diff --git a/components/drv2605/example/README.md b/components/drv2605/example/README.md index ffe0beb9d..36291c790 100644 --- a/components/drv2605/example/README.md +++ b/components/drv2605/example/README.md @@ -1,36 +1,21 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Drv2605 Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows the use of the `drv2605` component to communicate with and +control a DRV2605 I2C haptic motor driver for linear resonant actuator (LRA) and +eccentric rotating mass (ERM) haptic motors. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +![image](https://user-images.githubusercontent.com/213467/225453151-eeba4c4f-7070-4e87-9aa6-741f8a2400ca.png) ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` +This example can be used with the [Adafruit DRV2605 +Breakout](https://www.adafruit.com/product/2305) over I2C. -* _If there is any project configuration that the user must set for this example, mention this here._ +The sample has code for both ERM and LRA, but make sure to update the call to +`drv2605.select_library(...)` depending on which type of motor you have (ERM is +1-5, LRA is 6). ### Build and Flash @@ -46,22 +31,3 @@ idf.py -p PORT flash monitor See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/encoder/example/README.md b/components/encoder/example/README.md index ffe0beb9d..d10d676f2 100644 --- a/components/encoder/example/README.md +++ b/components/encoder/example/README.md @@ -1,36 +1,16 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Encoder Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `espp::AbiEncoder` from the `encoder` +component. It showcases both the `EncoderType::ROTATIONAL` and +`EncoderType::LINEAR` uses of the `AbiEncoder`. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example requires some hardware attached which provides ABI/ABZ (quadrature +encoder) input. An example is the ABI/ABZ output provided by the `Mt6701` +encoder and the `AS5600` encoder. ### Build and Flash @@ -45,23 +25,3 @@ idf.py -p PORT flash monitor (To exit the serial monitor, type ``Ctrl-]``.) See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. - -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/event_manager/example/README.md b/components/event_manager/example/README.md index ffe0beb9d..1200bac98 100644 --- a/components/event_manager/example/README.md +++ b/components/event_manager/example/README.md @@ -1,37 +1,12 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Event Manager Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows some basic usage for the `EventManager` which allows +asynchronous communications between multiple tasks following the anonymous +pub/sub interaction pattern - supporting one to one, one to many, many to one, +and many to many data and event dissemination. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +23,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/231610256-73cd92e1-168d-43cd-8c92-49b5e7e79dbf.png) diff --git a/components/file_system/example/README.md b/components/file_system/example/README.md index ffe0beb9d..da7049077 100644 --- a/components/file_system/example/README.md +++ b/components/file_system/example/README.md @@ -1,37 +1,15 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# File System Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows how the `file_system` component can be used to manage files +on a [littlefs](https://github.com/ARMmbed/littlefs) file system (wrapping the +associated [esp_littlefs +component](https://github.com/joltwallet/esp_littlefs)). -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +The example further shows how POSIX / newlib APIs can be used alongside (most +of) the `std::filesystem` APIs. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +26,5 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +![output](https://user-images.githubusercontent.com/213467/235329033-c3a74010-5f75-4b7f-b5ba-15f6a54e2cc2.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/filters/example/README.md b/components/filters/example/README.md index ffe0beb9d..01d383cf5 100644 --- a/components/filters/example/README.md +++ b/components/filters/example/README.md @@ -1,37 +1,11 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Filters Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows how to use a `LowpassFilter` and a `ButterworthFilter` from +the `filters` component to filter signals. This example simply operates on +random perturbations of auto-generated data. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +22,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/202814226-a0a41887-d5f0-4de8-a69b-df3e1a5ed316.png) diff --git a/components/ftp/example/README.md b/components/ftp/example/README.md index ffe0beb9d..0638972b9 100644 --- a/components/ftp/example/README.md +++ b/components/ftp/example/README.md @@ -1,36 +1,18 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# FTP Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example showcases the use of the `FtpServer` from the `ftp` component. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - ### Configure the project ``` idf.py menuconfig ``` -* _If there is any project configuration that the user must set for this example, mention this here._ +You'll need to configure the `WiFi` information that you wish the ESP to connect +to. You can optionally configure the FTP server port if you wish to use a +non-standard port. ### Build and Flash @@ -48,20 +30,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/235329930-15755d54-076a-4d4e-bf6f-93f1cbb5196b.png) diff --git a/components/joystick/example/README.md b/components/joystick/example/README.md index ffe0beb9d..b502ead90 100644 --- a/components/joystick/example/README.md +++ b/components/joystick/example/README.md @@ -1,36 +1,16 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Joystick Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows the use of the `Joystick` class to manage the input from and +perform mapping / calibration of joystick data from an analog joystick. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +![image](https://user-images.githubusercontent.com/213467/226445048-5e564333-2b53-4592-aac0-f8aa3137301e.png) ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example is designed to be used with an analog joystick directly connected +to the ESP ADC 2, channels 8 and 9. ### Build and Flash @@ -48,20 +28,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/226444494-4d94b212-c9d5-4638-9343-abc21e6f8689.png) diff --git a/components/led/example/README.md b/components/led/example/README.md index ffe0beb9d..fc0c5dd80 100644 --- a/components/led/example/README.md +++ b/components/led/example/README.md @@ -1,36 +1,15 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# LED Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows how to use the `espp::Led` class to control the LED using the +ESP32 hardware. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example is designed to be run on the M5Stack ESP32 Timer Cam (using its +LED). If you wish to run on other hardware, just make sure to set the GPIO that +you want to use in the code. ### Build and Flash @@ -48,20 +27,6 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +![output](https://user-images.githubusercontent.com/213467/232148065-194dbb01-06c4-4eae-a22b-ebd1ec0cc820.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +https://user-images.githubusercontent.com/213467/232148096-a0061f7b-011a-49b1-9354-aa8a3c81034a.mp4 diff --git a/components/led_strip/example/README.md b/components/led_strip/example/README.md index ffe0beb9d..dadffd714 100644 --- a/components/led_strip/example/README.md +++ b/components/led_strip/example/README.md @@ -1,36 +1,16 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# LED Strip Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `LedStrip` class to control a 5x5 array of RGB +LEDs (SK6805). ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project +This example is designed to be run on a [QtPy +ESP32-S3](https://www.adafruit.com/product/5426) with an [Adafruit Neopixel +BFF](https://www.adafruit.com/product/5646) attached. -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ ### Build and Flash @@ -48,20 +28,5 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +https://github.com/esp-cpp/espp/assets/213467/362d0942-f95c-4605-87be-bbc73c865b77 -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/logger/example/README.md b/components/logger/example/README.md index ffe0beb9d..1fc3c7e94 100644 --- a/components/logger/example/README.md +++ b/components/logger/example/README.md @@ -1,37 +1,10 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Logger Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows how to use the `logger` component to format and log data to +the console. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +21,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![image](https://user-images.githubusercontent.com/213467/242947542-8a3c0405-1c1f-4eee-a37a-eab76c9917a9.png) diff --git a/components/math/example/README.md b/components/math/example/README.md index ffe0beb9d..62ee3c0be 100644 --- a/components/math/example/README.md +++ b/components/math/example/README.md @@ -1,37 +1,10 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Math Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example showcases some of the math functionality provided by the `math` +component. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +21,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/228944623-3419c523-d61b-462f-ab08-e5554b06607e.png) diff --git a/components/mcp23x17/example/README.md b/components/mcp23x17/example/README.md index ffe0beb9d..d70c0d90d 100644 --- a/components/mcp23x17/example/README.md +++ b/components/mcp23x17/example/README.md @@ -1,36 +1,14 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# MCP23x17 Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows how to communicate with an MCP23017 I2C digital I/O exapander +using the `espp::Mcp23x17` component. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example is designed to be used with an [Adafruit MCP23017 I2C +Breakout](https://www.adafruit.com/product/5346) connected via I2C. ### Build and Flash @@ -46,22 +24,3 @@ idf.py -p PORT flash monitor See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/monitor/example/README.md b/components/monitor/example/README.md index ffe0beb9d..f6ae071f4 100644 --- a/components/monitor/example/README.md +++ b/components/monitor/example/README.md @@ -1,36 +1,18 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Monitor Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows how to use the `monitor` component to monitor the executing +tasks. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - ### Configure the project ``` idf.py menuconfig ``` -* _If there is any project configuration that the user must set for this example, mention this here._ +Note: the example already configures the `FREERTOS_USE_TRACE_FACILITY` and +`FREERTOS_GENERATE_RUN_TIME_STATS` sdkconfig to enable printing the task info. ### Build and Flash @@ -46,22 +28,3 @@ idf.py -p PORT flash monitor See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/mt6701/example/README.md b/components/mt6701/example/README.md index ffe0beb9d..cb57140a8 100644 --- a/components/mt6701/example/README.md +++ b/components/mt6701/example/README.md @@ -1,36 +1,20 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Mt6701 Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `Mt6701` component to communicate with a +MT6701 magnetic encoder chip. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project +It uses the `task` component to periodically read the raw count, position, and +velocity of the encoder, the `filters` component (specifically the +`espp::ButterworthFilter` class) to filter the raw values from the sensor, and +the `format` component to print the data to the console in CSV format. -``` -idf.py menuconfig -``` +### Hardware Required -* _If there is any project configuration that the user must set for this example, mention this here._ +This requires a MT6701 magnetic encoder dev board with an diametric magnet and +the MT6701 dev board should be connected to the ESP dev board you choose via +I2C. ### Build and Flash @@ -48,20 +32,11 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +Here is some example output plotted using the [uart serial +plotter](https://github.com/appliedinnovation/uart_serial_plotter): -## Example Breakdown +![example output +plotted](https://user-images.githubusercontent.com/213467/205207680-25a4fa41-bc31-4f5e-bc69-c5e2a026d710.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +For more information, see the original PR that included this component: +https://github.com/esp-cpp/espp/pull/5 diff --git a/components/pid/example/README.md b/components/pid/example/README.md index ffe0beb9d..ef0ef59ff 100644 --- a/components/pid/example/README.md +++ b/components/pid/example/README.md @@ -1,37 +1,13 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# PID Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows how to use the `espp::Pid` class to perform closed-loop +feedback control using proportional-integral-derivative (PID) control. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +The example does not operate on real hardware, but simply runs the PID algorithm +on fake data. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +24,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/228945440-0f98cffe-33fa-47b0-94a7-eaafb3062ed3.png) diff --git a/components/rmt/example/README.md b/components/rmt/example/README.md index ffe0beb9d..5c15babf5 100644 --- a/components/rmt/example/README.md +++ b/components/rmt/example/README.md @@ -1,36 +1,15 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# RMT Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `espp::Rmt` and `espp::RmtEncoder` classes of +the `rmt` component for driving an LED. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example is designed to be run on a +[TinyS3](https://esp32s3.com/tinys3.html) to control its WS2812 LED using the +ESP RMT peripheral. ### Build and Flash @@ -48,20 +27,7 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +![image](https://user-images.githubusercontent.com/213467/240423151-09133ec2-0074-4683-b020-f8eff4ac3d9b.png) -## Example Breakdown +https://github.com/esp-cpp/espp/assets/213467/321cb604-8ecb-40d6-9489-8e995c43f5b9 -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/rtsp/example/README.md b/components/rtsp/example/README.md index ffe0beb9d..99198bd06 100644 --- a/components/rtsp/example/README.md +++ b/components/rtsp/example/README.md @@ -1,28 +1,20 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# RTSP Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows the use of the `espp::RtspServer` and `espp::RtspClient` +classes provided by the `rtsp` component for performing streaming of JPEG images +(`espp::JpegFrame`) using the `MJPEG` format over the Real Time Streaming +Protocol (RTSP) / Real Time Protocol (RTP) packets. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +For more complete example use, see the +[camera-streamer](https://github.com/esp-cpp/camera-streamer) and +[camera-display](https://github.com/esp-cpp/camera-display) repositories. ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ +This example is designed to be run on an M5Stack ESP32 Timer Cam module (server) or a +ESP32-S3-Box (client). ### Configure the project @@ -30,10 +22,14 @@ _If any other items (server, BLE device, app, second chip, whatever) are needed, idf.py menuconfig ``` -* _If there is any project configuration that the user must set for this example, mention this here._ +You need to configure the `WiFi` network in the `RTSP Example Configuration` +menuconfig and you can optionally configure the `RTSP Server Port` (default +8554). ### Build and Flash +NOTE: this example is designed to be modified into client only or server-only operation depending on the hardware it is deployed to. + Build the project and flash it to the board, then run monitor tool to view serial output: ``` @@ -48,20 +44,15 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ +Example showing the server (camera), the client (handheld display), and the python client, with both clients connected simultaneously: -## Troubleshooting +https://user-images.githubusercontent.com/213467/236601258-c334e1ba-5e18-4452-b48d-e792ec2ed4fb.mp4 -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ +Screenshot showing the server running for a very long time (all day, see timestamp in log > 33,000 seconds): +![all_day_test](https://user-images.githubusercontent.com/213467/236601320-0d9139d7-0333-4c63-b26f-da4078e141b7.png) -## Example Breakdown +Screenshot showing the received framerate on the camera-display: +CleanShot 2023-05-06 at 10 27 21@2x -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +Screenshot of main code for camera-streamer output: +CleanShot 2023-05-06 at 10 29 31@2x diff --git a/components/serialization/example/README.md b/components/serialization/example/README.md index ffe0beb9d..00885c063 100644 --- a/components/serialization/example/README.md +++ b/components/serialization/example/README.md @@ -1,37 +1,11 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Serialization Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `serialization` component (and the `alpaca` +library it wraps) to perform robust and reliable binary serialization and +deserialization of arbitrary objects. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -45,23 +19,3 @@ idf.py -p PORT flash monitor (To exit the serial monitor, type ``Ctrl-]``.) See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. - -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/socket/example/README.md b/components/socket/example/README.md index ffe0beb9d..0f16fb151 100644 --- a/components/socket/example/README.md +++ b/components/socket/example/README.md @@ -1,37 +1,13 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Socket Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows the use of the classes provided by the `socket` component, +including: -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +* `UdpSocket` (as both `client` and `server`, including unicast and multicast configurations) +* `TcpSocket` (as both `client` and `server`) ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +24,4 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +![output](https://user-images.githubusercontent.com/213467/235313443-d745261e-3e3c-4a7e-87ae-ef525a380e21.png) diff --git a/components/st25dv/example/README.md b/components/st25dv/example/README.md index ffe0beb9d..e657ffa50 100644 --- a/components/st25dv/example/README.md +++ b/components/st25dv/example/README.md @@ -1,36 +1,16 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# St25dv Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows how to configure a `espp::St25dv` class to communicate with +an ST25DV reprogrammable NFC tag. -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +![image](https://user-images.githubusercontent.com/213467/208487542-9bb15cdc-ae4f-41a9-ba5a-b71adfa3b7e7.png) ## How to use example ### Hardware Required -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ +This example is designed to be used with an [Adafruit ST26DV16K +breakout](https://www.adafruit.com/product/4701), connected via I2C. ### Build and Flash @@ -48,20 +28,12 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +![output](https://user-images.githubusercontent.com/213467/209173473-28d0b3f3-c636-4a48-ab0a-4370d1d9ab9d.png) +![output 2](https://user-images.githubusercontent.com/213467/208487187-237ba823-0ded-4b71-adc5-17332fb4ad15.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +Reading tag containing text: +![phone 1](https://user-images.githubusercontent.com/213467/208488067-03cba102-9cb0-4412-bb9e-a922bdfbefff.png) +Open web link: +![phone 2](https://user-images.githubusercontent.com/213467/208943100-b7e8a7c5-7cbc-42e4-8b1a-235e753649f8.png) +Bluetooth pairing: +![phone 3](https://user-images.githubusercontent.com/213467/209022013-cfb380f0-0bc0-42bb-898e-fe3053007a5f.png) diff --git a/components/state_machine/example/README.md b/components/state_machine/example/README.md index ffe0beb9d..a4b9243e2 100644 --- a/components/state_machine/example/README.md +++ b/components/state_machine/example/README.md @@ -1,37 +1,15 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Hierarchichal Finite State Machine (HFSM) Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | +This example shows an example of running the below HFSM on an ESP32 in a +real-world scenario (e.g. spawning events from one or more threads and running +the HFSM in its own thread) as well as in a test-bench scenario (e.g. running a +CLI to manually spawn events and trace the execution). For more information, see +[webgme-hfsm](https://github.com/finger563/webgme-hfsm). -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +![hfsm](https://user-images.githubusercontent.com/213467/230950083-d4d8a483-31a7-43ac-8822-b1e28d552984.png) ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -48,20 +26,8 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown +Running the HFSM in a task and sending events to it: +![CleanShot 2023-04-10 at 10 55 19](https://user-images.githubusercontent.com/213467/230945519-165eda62-2e61-4e57-9571-cb2b945b62fb.png) -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file +Running the test bench: +![CleanShot 2023-04-10 at 10 55 43](https://user-images.githubusercontent.com/213467/230945553-c6acd4cc-2de3-4413-aec0-6de506b2347f.png) diff --git a/components/task/example/README.md b/components/task/example/README.md index ffe0beb9d..fecc416c9 100644 --- a/components/task/example/README.md +++ b/components/task/example/README.md @@ -1,37 +1,11 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# Task Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows some various different ways of starting and stopping tasks, +as well as examples of how to wait, block, exit early, and run long-running +computations within tasks using the `task` component. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - -### Configure the project - -``` -idf.py menuconfig -``` - -* _If there is any project configuration that the user must set for this example, mention this here._ - ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: @@ -45,23 +19,3 @@ idf.py -p PORT flash monitor (To exit the serial monitor, type ``Ctrl-]``.) See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. - -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file diff --git a/components/wifi/example/README.md b/components/wifi/example/README.md index ffe0beb9d..cf800203d 100644 --- a/components/wifi/example/README.md +++ b/components/wifi/example/README.md @@ -1,36 +1,20 @@ -_Note that this is a template for an ESP-IDF example README.md file. When using this template, replace all these emphasised placeholders with example-specific content._ +# WiFi Example -| Supported Targets | _Supported target, e.g. ESP32_ | _Another supported target, e.g. ESP32-S3_ | -| ----------------- | ------------------------------ | ----------------------------------------- | - -_If the example supports all targets supported by ESP-IDF then the table can be omitted_ -# _Example Title_ - -(See the README.md file in the upper level 'examples' directory for more information about examples.) - -_What is this example? What does it do?_ - -_What features of ESP-IDF does it use?_ - -_What could someone create based on this example? ie applications/use cases/etc_ - -_If there are any acronyms or Espressif-only words used here, explain them or mention where in the datasheet/TRM this information can be found._ +This example shows the use of the `espp::WifiSta` for connecting to existing +wifi networks, and the `espp::WifiAp` for creating a wifi access point, both of +which are provided by the `wifi` component. ## How to use example -### Hardware Required - -_If possible, example should be able to run on any commonly available ESP32 development board. Otherwise, describe what specific hardware should be used._ - -_If any other items (server, BLE device, app, second chip, whatever) are needed, mention them here. Include links if applicable. Explain how to set them up._ - ### Configure the project ``` idf.py menuconfig ``` -* _If there is any project configuration that the user must set for this example, mention this here._ +Since this example tests the `espp::WifiSta` which acts as a station and +connects to a pre-existing WiFi network, you should configure the wifi network +you want to connect to. ### Build and Flash @@ -45,23 +29,3 @@ idf.py -p PORT flash monitor (To exit the serial monitor, type ``Ctrl-]``.) See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. - -## Example Output - -_Include an example of the console output from the running example, here:_ - -``` -Use this style for pasting the log. -``` - -_If the user is supposed to interact with the example at this point (read/write GATT attribute, send HTTP request, press button, etc. then mention it here)_ - -_For examples where ESP32 is connected with some other hardware, include a table or schematics with connection details._ - -## Troubleshooting - -_If there are any likely problems or errors which many users might encounter, mention them here. Remove this section for very simple examples where nothing is likely to go wrong._ - -## Example Breakdown - -_If the example source code is lengthy, complex, or cannot be easily understood, use this section to break down and explain the source code. This can be done by breaking down the execution path step by step, or explaining what each major function/task/source file does. Add sub titles if necessary. Remove this section for very simple examples where the source code is self explanatory._ \ No newline at end of file