Update README.md with updated usage instructions

This commit is contained in:
Dave Allie 2025-12-02 22:41:16 +11:00
parent d52cab5735
commit 182ff5f4ea
No known key found for this signature in database
GPG Key ID: F2FDDB3AD8D0276F

View File

@ -39,15 +39,22 @@ Libs should be categorized under `libs/` based on functionality, and then contai
Add this repository as a submodule: Add this repository as a submodule:
```bash ```bash
git submodule add https://github.com/open-x4-epaper/community-sdk.git lib/openx4 git submodule add https://github.com/open-x4-epaper/community-sdk.git open-x4-sdk
``` ```
Then include any library you want in your code: Then include add the lib categories you need into your `platformio.ini` file:
```ini
lib_extra_dirs =
open-x4-sdk/libs/display
open-x4-sdk/libs/hardware
```
Then you can include the libraries in your project as needed:
```cpp ```cpp
#include <openx4/display/BufferedEinkDisplay/BufferedEinkDisplay.h> #include <BatteryMonitor.h>
#include <openx4/graphics/Canvas/Canvas.h> #include <EpdScreenController.h>
``` `````
Or load tools from the `tools/` directory as needed. Or load tools from the `tools/` directory as needed.