Skip to content

Commit

Permalink
Merge pull request #65 from esp-cpp/doc/61_readme_updates
Browse files Browse the repository at this point in the history
doc: update
  • Loading branch information
finger563 authored Jun 4, 2023
2 parents a0a5c6a + 0771700 commit de01b1f
Show file tree
Hide file tree
Showing 34 changed files with 384 additions and 1,473 deletions.
59 changes: 10 additions & 49 deletions components/adc/example/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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._
52 changes: 6 additions & 46 deletions components/ads1x15/example/README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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._
![example_output](https://user-images.githubusercontent.com/213467/225378943-a1aabb6a-c12c-4c91-9fcc-9e2d76555e3e.png)
59 changes: 20 additions & 39 deletions components/as5600/example/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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._
For more information, see the original PR that included this component:
https://github.com/esp-cpp/espp/pull/5
53 changes: 12 additions & 41 deletions components/aw9523/example/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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._
https://user-images.githubusercontent.com/213467/225365600-5ad600e9-68d6-4ddc-96d6-f56b72ec1a0e.mp4
Loading

0 comments on commit de01b1f

Please sign in to comment.