Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/general/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,16 @@ There are 3 levels to add functionality:

* **Standard ESP32-Sveltekit code**, e.g. Connections, Wifi and System. MoonBase files is also made using standard sveltekit as example but contains a few components used in MoonLight modules. Might be rewriteen as MoonLight Module in the future.
* [MoonLight Modules](https://moonmodules.org/MoonLight/moonbase/modules/) e.g. Light Control, Editor, Info, Channel View. They are subclasses of Modules.h/cpp and implement setupDefinition, onUpdate and optional loop. New modules need to be defined in main.cpp and added to menu.svelte. All further UI is generated by Module.svelte.
* **MoonLight Nodes**: the easiest and recommended way. See Effects.h, Layouts.h, Modifiers.h and Mods.h for examples. They match closest WLED usermods. Each node has controls, a setup and a loop and can be switched on and off. For specific purposes hasLayout and hasModifier can be set.
* **MoonLight Nodes**: the easiest and recommended way. See Effects.h, Layouts.h, Modifiers.h and Mods.h for examples. They match closest WLED usermods. Each node has controls, a setup and a loop and can be switched on and off. For specific purposes hasLayout and hasModifier can be set.

### Adding a Board Definition

Before starting, ensure you have the datasheet of your particular chip and board confirmed available. Many modules have near-identical markings that can hide varying hardware.

There are 3 files to consider when making a board definition.

boards/BOARD_NAME.csv
boards/BOARD_NAME.JSON
variants/BOARD_NAME.ini

🚧
54 changes: 54 additions & 0 deletions docs/general/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Share Knowledge - Improve Documentation

A software project includes its functional aspects and the knowledge surrounding it. Document your experience to make it easier to have fun making things and to get engaged in improving the project.

### MKDocs Preview in VS Code - Installation

This method can be used to see a live preview of changes to the docs while editing in VS Code.

Download the ZIP: [https://github.com/libukai/mkdocs-preview](https://github.com/libukai/mkdocs-preview)

Place the following in workspace settings (F1, if working in a workspace) or create .vscode/settings.json:

{
"mkdocsPreview.port": 8000,
//"mkdocsPreview.port": 4001,

// remove the '/docs' prefix from every URL
// rewrite "/docs/XYZ" → "/XYZ"
"mkdocsPreview.baseDir": "",
"mkdocsPreview.urlReplace": "/docs/||/",

"simpleBrowser.defaultUrl": "http://localhost:8000/"
//"simpleBrowser.defaultUrl": "http://127.0.0.1:8000/",
}

Open Powershell in your working directory in VS Code.

Run:

python --version
python -m pip --version
python -m pip install --upgrade pip
python -m pip install mkdocs-material

Run either:

mkdocs serve -a localhost:8000
mkdocs serve -a 127.0.0.1:8000

It should now be visible 🐉


####Troubleshooting:
1. Try using these commands to manually test addresses after starting the service in VS Code:

Ctl + Shft + P -> MKDocs Preview: Toggle MkDocs Preview

Ctl+ Shft + P -> Simple Browser: Show

2. Check the address in a browser:

[https://localhost:8000](https://localhost:8000)

[https://127.0.0.1:8000/](https://127.0.0.1:8000/)
5 changes: 4 additions & 1 deletion docs/general/hardware.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MoonLight hardware
# MoonLight Hardware

## MoonLight specific

Expand All @@ -15,3 +15,6 @@

<img width="350" src="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/user-attachments/assets/1623a751-5f4b-463b-a6f3-a642c2bc52bf"/>

## Adding a new board

See [Adding a Board Definition](https://moonmodules.org/MoonLight/general/adding-a-board-definition)