[docs] Refactor docs structure, add project upload guides

This commit is contained in:
Kuba Szczodrzyński
2023-01-17 18:56:15 +01:00
parent 7440fc6f46
commit 9e95c507b1
27 changed files with 342 additions and 142 deletions

View File

@@ -13,16 +13,9 @@ Using LibreTuya is simple, just like every other PlatformIO development platform
- Click on the board name. From the documentation page, note the board code.
- Use this code to create a PlatformIO project.
## GPIO usage
## Run community projects
!!! important
This can be confusing at first, so make sure to read this part carefully to understand it.
Input/output pin numbers in Arduino code (i.e. `digitalWrite()`) use Arduino pin numbers - for example `D1`, `D3`. This is the same as simply `1` or `3`, but it cannot be confused with CPU GPIO numbers.
On the board pinout page, the purple blocks represent Arduino pins, while the dark red blocks refer to GPIO numbers.
Projects like ESPHome also use Arduino pin numbering.
LibreTuya was developed with popular community projects in mind. Currently, unofficial [ESPHome port](../projects/esphome.md) is available ([the PR](https://github.com/esphome/esphome/pull/3509) will hopefully be merged into upstream at some point).
## Develop your own project
@@ -31,8 +24,24 @@ If you're developing your own embedded software, and want it to run on LibreTuya
- use PlatformIO IDE (PIO Home -> Open -> New Project)
- run `pio project init` in your desired project directory
Next, read [Uploading](uploading.md) guide to run your project!
Next, read one of the [flashing guides](../flashing/SUMMARY.md) to run your project!
## Run community projects
### LT configuration
LibreTuya was developed with popular community projects in mind. Currently, unofficial [ESPHome port](../projects/esphome.md) is available ([the PR](https://github.com/esphome/esphome/pull/3509) will hopefully be merged into upstream at some point).
LibreTuya has a few configuration options that change its behavior or features. Refer to [LT configuration](../reference/config.md) for details.
### GPIO usage
!!! important
This can be confusing at first, so make sure to read this part carefully to understand it.
Input/output pin numbers in Arduino code (i.e. `digitalWrite()`) use Arduino pin numbers - for example `D1`, `D3`. This is the same as simply `1` or `3`, but it cannot be confused with CPU GPIO numbers.
On the board pinout page, the purple blocks represent Arduino pins, while the dark red blocks refer to GPIO numbers.
### Examples
{%
include-markdown "../../examples/SUMMARY.md"
start="# Examples\n"
%}