You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/contributing.rst
+87-3Lines changed: 87 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Before sending us a Pull Request, please consider this:
24
24
* Are comments and documentation written in clear English, with no spelling or grammar errors?
25
25
26
26
* Example contributions are also welcome.
27
-
* If you are contributing by adding a new example, please use the `Arduino style guide`_.
27
+
* If you are contributing by adding a new example, please use the `Arduino style guide`_ and the example guideline below.
28
28
29
29
* If the contribution contains multiple commits, are they grouped together into logical changes (one major change per pull request)? Are any commits with names like "fixed typo" `squashed into previous commits <https://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit/>`_?
30
30
@@ -39,11 +39,95 @@ Once the Pull Request is ready to merge, it will first be merged into our intern
39
39
40
40
If this process passes, it will be merged onto the public github repository.
41
41
42
+
Example Contribution Guideline
43
+
------------------------------
44
+
45
+
Checklist
46
+
*********
47
+
48
+
* Check if your example proposal has no similar in the project
49
+
* Use the `Arduino style guide`_
50
+
* Add the header to all source files
51
+
* Add the `README.md` file
52
+
* Add inline comments if needed
53
+
* Test the example
54
+
55
+
Header
56
+
******
57
+
58
+
All the source files must include the header with the example name and license, if applicable. You can change this header as you with, but it will be reviewed by the community and may not be accepted.
59
+
60
+
Additionaly, you can add some description about the example, links to the documentation or authors name. Just have in mind to keep it simple and short.
61
+
62
+
**Header Example**
63
+
64
+
.. code-block:: arduino
65
+
66
+
/* Wi-Fi FTM Initiator Arduino Example
67
+
68
+
This example code is in the Public Domain (or CC0 licensed, at your option.)
69
+
70
+
Unless required by applicable law or agreed to in writing, this
71
+
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
72
+
CONDITIONS OF ANY KIND, either express or implied.
73
+
*/
74
+
75
+
76
+
README file
77
+
***********
78
+
79
+
The **README.md** file should contain the example details.
80
+
81
+
Please see the recommended **README.md** file in the `example template folder <https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Template/ExampleTemplate>`_.
82
+
83
+
Inline Comments
84
+
***************
85
+
86
+
Inline comments are important if the example contains complex algorithms os specific configuration that the user needs to change.
87
+
88
+
**Example**
89
+
90
+
.. code-block:: arduino
91
+
92
+
// Number of FTM frames requested in terms of 4 or 8 bursts (allowed values - 0 (No pref), 16, 24, 32, 64)
93
+
94
+
and
95
+
96
+
.. code-block:: arduino
97
+
98
+
const char * WIFI_FTM_SSID = "WiFi_FTM_Responder"; // SSID of AP that has FTM Enabled
99
+
const char * WIFI_FTM_PASS = "ftm_responder"; // STA Password
100
+
101
+
Testing
102
+
*******
103
+
104
+
Be sure you have tested the example in all the supported targets. If the example works only with specific targets, add this information in the **README.md** file on the **Supported Targets** and in the example code as inline comment.
105
+
106
+
**Example**
107
+
108
+
.. code-block:: arduino
109
+
110
+
/*
111
+
THIS FEATURE IS SUPPORTED ONLY BY ESP32-S2 AND ESP32-C3
112
+
*/
113
+
114
+
and
115
+
116
+
.. code-block:: markdown
117
+
118
+
Currently, this example supports the following targets.
The example template can be found `here <https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Template/ExampleTemplate>`_ and can be used as a reference.
127
+
42
128
Legal Part
43
129
----------
44
130
45
131
Before a contribution can be accepted, you will need to sign our contributor-agreement. You will be prompted for this automatically as part of the Pull Request process.
Copy file name to clipboardExpand all lines: libraries/ESP32/examples/Template/ExampleTemplate/README.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Arduino-ESP32 Example/Library Name ==(REQUIRED)==
2
2
3
-
==*Add a brief description about this example/library here!*==
3
+
==*Add a brief description of this example/library here!*==
4
4
5
5
This example/library demonstrates how to create a new example README file.
6
6
@@ -15,33 +15,33 @@ Currently, this example supports the following targets.
15
15
16
16
## How to Use Example/Library ==(OPTIONAL)==
17
17
18
-
==*Add a brief description on how to use this example.*==
18
+
==*Add a brief description of how to use this example.*==
19
19
20
20
* How to install the Arduino IDE: [Install Arduino IDE](https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide).
21
21
22
22
### Hardware Connection ==(OPTIONAL)==
23
23
24
-
==*Add a brief description about wiring or any other hardwarespecific connection.*==
24
+
==*Add a brief description of wiring or any other hardware-specific connection.*==
25
25
26
26
To use this example, you need to connect the LED to the `GPIOx`.
27
27
28
28
SDCard GPIO connection scheme:
29
29
30
-
| SDCard Pin | Function | GPIO |
30
+
| SDCard Pin | Function | GPIO|
31
31
| ----------- | -------- | ------ |
32
-
| 1 | CS | GPIO5 |
33
-
| 2 | DI/MOSI | GPIO23 |
34
-
| 3 | VSS/GND | GND |
35
-
| 4 | VDD/3V3 | 3V3 |
36
-
| 5 | SCLK | GPIO18 |
37
-
| 6 | VSS/GND | GND |
38
-
| 7 | DO/MISO | GPIO19 |
32
+
| 1 | CS | GPIO5|
33
+
| 2 | DI/MOSI| GPIO23 |
34
+
| 3 | VSS/GND | GND|
35
+
| 4 | VDD/3V3 | 3V3|
36
+
| 5 | SCLK| GPIO18 |
37
+
| 6 | VSS/GND | GND|
38
+
| 7 | DO/MISO| GPIO19 |
39
39
40
40
To add images, please create a folder `_asset` inside the example folder to add the relevant images.
41
41
42
42
### Configure the Project ==(OPTIONAL)==
43
43
44
-
==*Add a brief description about this example here!*==
44
+
==*Add a brief description of this example here!*==
45
45
46
46
Set the LED GPIO by changing the `LED_BUILTIN` value in the function `pinMode(LED_BUILTIN, OUTPUT);`. By default, the GPIO is: `GPIOx`.
47
47
@@ -66,7 +66,7 @@ To get more information about the Espressif boards see [Espressif Development Ki
66
66
67
67
#### Using Platform IO
68
68
69
-
* Select the COM port: `Devices` or setting the `upload_port` option on the `platformio.ini` file.
69
+
* Select the COM port: `Devices` or set the `upload_port` option on the `platformio.ini` file.
70
70
71
71
## Example/Log Output ==(OPTIONAL)==
72
72
@@ -98,21 +98,21 @@ Chip ID: 3957392
98
98
***Programming Fail:** If the programming/flash procedure fails, try reducing the serial connection speed.
99
99
***COM port not detected:** Check the USB cable and the USB to Serial driver installation.
100
100
101
-
If the error persist, you can ask for help at the official [ESP32 forum](https://esp32.com) or see [Contribute](#contribute).
101
+
If the error persists, you can ask for help at the official [ESP32 forum](https://esp32.com) or see [Contribute](#contribute).
102
102
103
103
## Contribute ==(REQUIRED)==
104
104
105
-
==*Do not change! Keep as is.*==
105
+
==*Do not change! Keep it as is.*==
106
106
107
107
To know how to contribute to this project, see [How to contribute.](https://github.com/espressif/arduino-esp32/blob/master/CONTRIBUTING.rst)
108
108
109
109
If you have any **feedback** or **issue** to report on this example/library, please open an issue or fix it by creating a new PR. Contributions are more than welcome!
110
110
111
-
Before creating a new issue, be sure to try the Troubleshooting and to check if the same issue was already created by someone else.
111
+
Before creating a new issue, be sure to try Troubleshooting and check if the same issue was already created by someone else.
112
112
113
113
## Resources ==(REQUIRED)==
114
114
115
-
==*Do not change here! Keep as is or add only relevant documents/info for this example. Do not add any purchase link/marketing stuff*==
115
+
==*Do not change here! Keep it as is or add only relevant documents/info for this example. Do not add any purchase link/marketing stuff*==
116
116
117
117
* Official ESP32 Forum: [Link](https://esp32.com)
118
118
* Arduino-ESP32 Official Repository: [espressif/arduino-esp32](https://github.com/espressif/arduino-esp32)
0 commit comments