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
+98-9
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,17 @@ Before Contributing
15
15
16
16
Before sending us a Pull Request, please consider this:
17
17
18
-
* Is the contribution entirely your own work, or is it already licensed under an LGPL 2.1 compatible Open Source License? If not, we unfortunately cannot accept it.
18
+
* Is the contribution entirely your own work, or is it already licensed under an LGPL 2.1 compatible Open Source License? If not, cannot accept it.
19
19
20
-
* Is the code adequately commented for people to understand how it is structured?
20
+
* Is the code adequately commented and can people understand how it is structured?
21
21
22
22
* Is there documentation or examples that go with code contributions?
23
23
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
+
28
+
* If you are contributing by adding a new example, please use the `Arduino style guide`_ and the example guideline below.
28
29
29
30
* 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
31
@@ -33,17 +34,105 @@ If you're unsure about any of these points, please open the Pull Request anyhow
33
34
Pull Request Process
34
35
--------------------
35
36
36
-
After you open the Pull Request, there will probably be some discussion in the comments' field of the request itself.
37
+
After you open the Pull Request, there will probably be some discussion in the comments field of the request itself.
37
38
38
-
Once the Pull Request is ready to merge, it will first be merged into our internal git system for in-house automated testing.
39
+
Once the Pull Request is ready to merge, it will first be merged into our internal git system for "in-house" automated testing.
39
40
40
-
If this process passes, it will be merged onto the public github repository.
41
+
If this process passes, it will be merged into the public GitHub repository.
41
42
42
-
Legal Part
43
-
----------
43
+
Example Contribution Guideline
44
+
------------------------------
45
+
46
+
Checklist
47
+
*********
48
+
49
+
* Check if your example proposal has no similarities to the project (**already existing examples**)
50
+
* Use the `Arduino style guide`_
51
+
* Add the header to all source files
52
+
* Add the `README.md` file
53
+
* Add inline comments if needed
54
+
* Test the example
55
+
56
+
Header
57
+
******
58
+
59
+
All the source files must include the header with the example name and license, if applicable. You can change this header as you wish, but it will be reviewed by the community and may not be accepted.
60
+
61
+
Ideally, you can add some description about the example, links to the documentation, or the author's name. Just have in mind to keep it simple and short.
62
+
63
+
**Header Example**
64
+
65
+
.. code-block:: arduino
66
+
67
+
/* Wi-Fi FTM Initiator Arduino Example
68
+
69
+
This example code is in the Public Domain (or CC0 licensed, at your option.)
70
+
71
+
Unless required by applicable law or agreed to in writing, this
72
+
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
73
+
CONDITIONS OF ANY KIND, either express or implied.
74
+
*/
75
+
76
+
77
+
README file
78
+
***********
79
+
80
+
The **README.md** file should contain the example details.
81
+
82
+
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>`_.
83
+
84
+
Inline Comments
85
+
***************
86
+
87
+
Inline comments are important if the example contains complex algorithms or specific configurations that the user needs to change.
88
+
89
+
Brief and clear inline comments are really helpful for the example understanding and it's fast usage.
44
90
45
-
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.
91
+
**Example**
46
92
93
+
See the `FTM example <https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/FTM/FTM_Initiator/FTM_Initiator.ino>`_ as a reference.
94
+
95
+
.. code-block:: arduino
96
+
97
+
// Number of FTM frames requested in terms of 4 or 8 bursts (allowed values - 0 (No pref), 16, 24, 32, 64)
98
+
99
+
and
100
+
101
+
.. code-block:: arduino
102
+
103
+
const char * WIFI_FTM_SSID = "WiFi_FTM_Responder"; // SSID of AP that has FTM Enabled
104
+
const char * WIFI_FTM_PASS = "ftm_responder"; // STA Password
105
+
106
+
Testing
107
+
*******
108
+
109
+
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 an inline comment.
110
+
111
+
**Example**
112
+
113
+
.. code-block:: arduino
114
+
115
+
/*
116
+
THIS FEATURE IS SUPPORTED ONLY BY ESP32-S2 AND ESP32-C3
117
+
*/
118
+
119
+
and
120
+
121
+
.. code-block:: markdown
122
+
123
+
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.
132
+
133
+
Legal Part
134
+
----------
47
135
136
+
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-17
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