Skip to content
Open
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
5 changes: 3 additions & 2 deletions docs/gettingstarted/installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Recommended low-cost DIY board up to 10K LEDs: [ESP32-S3 n16r8](https://s.click.

![esp32-s3-n16r8v](../firmware/installer/images/esp32-s3-n8r8v.jpg){: style="width:100px"}

Recommended state-of-the-art DIY board, up to 16K - 98K LEDs !: [ESP32-P4-Nano](https://www.waveshare.com/esp32-p4-nano.htm){:target="_blank"}
Recommended state-of-the-art DIY board, up to 16-98K LEDs: [ESP32-P4-Nano](https://www.waveshare.com/esp32-p4-nano.htm){:target="_blank"}

![esp32-p4-nano](../firmware/installer/images/esp32-p4-nano.jpg){: style="width:100px"}

Expand All @@ -45,8 +45,9 @@ After a successful install, go to **Logs & Console**, press **Reset Device**, an

| Name | Image* | Flash | Shop & Board presets |
|------|--------|-------|----------------------|
| esp32-d0 | ![esp32-d0](../firmware/installer/images/esp32-d0.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0.json"></esp-web-install-button> | [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-uno):<br>![Dig Uno](https://quinled.info/wp-content/uploads/2020/02/QuinLED-Dig-Uno-v3_front.png){: style="width:100px"}<br>[Dig Quad](https://quinled.info/pre-assembled-quinled-dig-quad):<br>![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"}<br>[Dig2Go](https://quinled.info/quinled-dig2go):<br>![Dig2Go](https://shop.allnetchina.cn/cdn/shop/products/Led_4.jpg?v=1680836018&width=1600){: style="width:100px"} |
| esp32-d0 | ![esp32-d0](../firmware/installer/images/esp32-d0.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0.json"></esp-web-install-button> | [Dig2Go](https://quinled.info/quinled-dig2go):<br>![Dig2Go](https://shop.allnetchina.cn/cdn/shop/products/Led_4.jpg?v=1680836018&width=1600){: style="width:100px"}<br>[Dig Uno](https://quinled.info/pre-assembled-quinled-dig-uno):<br>![Dig Uno](https://quinled.info/wp-content/uploads/2020/02/QuinLED-Dig-Uno-v3_front.png){: style="width:100px"}<br>[Dig Quad](https://quinled.info/pre-assembled-quinled-dig-quad):<br>![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"} |
| esp32-d0-16mb | ![esp32-d0-16mb](../firmware/installer/images/esp32-d0-16mb.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0-16mb.json"></esp-web-install-button> | [Dig Octa](https://quinled.info/quinled-dig-octa):<br>![Dig Octa](https://quinled.info/wp-content/uploads/2024/10/20240924_141857-2048x1444.png){: style="width:100px"}<br>[Serg ESP32](https://www.tindie.com/products/serg74/esp32-wroom-usb-c-d1-mini32-form-factor-board){:target="_blank"} and [Shield](https://www.tindie.com/products/serg74/wled-shield-board-for-addressable-leds)<br>![Shield](https://cdn.tindiemedia.com/images/resize/44YE-eNQ9pJQUh_SmtwwfBXFbAE=/p/fit-in/1370x912/filters:fill(fff)/i/93057/products/2021-08-14T14%3A44%3A14.418Z-shield_v3-1.jpg?1628927139){: style="width:100px"} |
| [esp32-d0-pico2](https://documentation.espressif.com/esp32-pico-mini-02_datasheet_en.pdf) | ![esp32-d0-pico2](../firmware/installer/images/esp32-d0-pico2.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0-pico2.json"></esp-web-install-button> | [DigNext2](https://quinled.info/dig-next-2):<br>![DigNext2](https://quinled.info/wp-content/uploads/2026/01/P1087754-Enhanced-NR-2560x1358.jpg){: style="width:100px"} |
| esp32-s3-n8r8v | ![esp32-s3-n8r8v](../firmware/installer/images/esp32-s3-n8r8v.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-n8r8v.json"></esp-web-install-button> | SE-16p<br>![SE-16p](../firmware/installer/images/esp32-s3-stephanelec-16p.jpg){: style="width:100px"} |
| esp32-s3-n16r8v | ![esp32-s3-n16r8v](../firmware/installer/images/esp32-s3-n8r8v.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-n16r8v.json"></esp-web-install-button> | [Ali*](https://s.click.aliexpress.com/e/_DBAtJ2H){:target="_blank"} |
| esp32-s3-atoms3r | ![esp32-s3-atoms3r](../firmware/installer/images/esp32-s3-atoms3r.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-atoms3r.json"></esp-web-install-button> | [M5Stack store](https://shop.m5stack.com/products/atoms3r-dev-kit){:target="_blank"} |
Expand Down
2 changes: 2 additions & 0 deletions docs/moonbase/inputoutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ For each board the following presets are defined:
### QuinLed boards

![Dig2Go](https://shop.allnetchina.cn/cdn/shop/products/Led_4.jpg?v=1680836018&width=1600){: style="width:100px"}
![DigNext2](https://quinled.info/wp-content/uploads/2026/01/P1087754-Enhanced-NR-2560x1358.jpg){: style="width:100px"}
![Dig Uno](https://quinled.info/wp-content/uploads/2020/02/QuinLED-Dig-Uno-v3_front.png){: style="width:100px"}
![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"}
![Dig Octa](https://quinled.info/wp-content/uploads/2024/10/20240924_141857-2048x1444.png){: style="width:100px"}

* [Dig2Go](https://quinled.info/quinled-dig2go/), [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-uno/), [Dig Quad](https://quinled.info/pre-assembled-quinled-dig-quad/): Choose the esp32-d0 (4MB) board in the [MoonLight Installer](../../gettingstarted/installer/)
* Dig2Go: Shipped with a 300 LED, GRBW led strip: Choose layout with 300 lights (e.g. Single Column for 1D, Panel 15x20 for 2D). Select Light preset GRBW in the LED Driver.
* [DigNext2](https://quinled.info/dig-next-2): Choose the esp32-d0-pico2 board in the [MoonLight Installer](../../gettingstarted/installer/)
* [Dig Octa](https://quinled.info/quinled-dig-octa/): Choose the esp32-d0-16mb board in the [MoonLight Installer](../../gettingstarted/installer/)
* On first install, erase flash first (Especially when other firmware like WLED was on it) as MoonLight uses a partition scheme with 3MB of flash (currently no OTA support).
* After install, select the QuinLED board preset to have the pins assigned correctly.
Expand Down
2 changes: 1 addition & 1 deletion docs/moonlight/modifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ The following Modifiers are defined in MoonLight. Some found there origin in WLE
| Rotate | ![Rotate](https://github.com/user-attachments/assets/c622a9df-318a-4f83-81c0-f5a5c7bafb7b) | <img width="320" alt="Rotate" src="https://github.com/user-attachments/assets/7273a625-5e14-4814-92e8-8f7f65cfc02e" /> | |
| Checkerboard | ![Checkerboard](https://github.com/user-attachments/assets/54970267-35af-406c-9558-c1f4219a71c0) | <img width="320" alt="Checkerboard" src="https://github.com/user-attachments/assets/66d51dc7-b816-4ca7-b1e3-57b067566516" /> | |
| Pinwheel 🧊 | ![PinWheel](https://github.com/user-attachments/assets/e5dbadbe-eeb1-41e5-b197-ec4bd5366aea) | <img width="320" alt="PinWheel" src="https://github.com/user-attachments/assets/46585cea-d301-4221-9af2-65f8054543da" /> | Projects 1D/2D effects onto 2D/3D layouts in a pinwheel pattern.<br>**Swirl**: bend the pinwheel<br>**Rotation Symmetry**: rotational symmetry of the pattern<br>**Petals** Virtual width<br>**Ztwist** twist the pattern along the z-axis<br>Height: distance from center to corner |
| RippleYZ 🧊 | ![RippleYZ](https://github.com/user-attachments/assets/0918efac-6367-420f-b0e3-d796d9551953) | <img width="320" alt="RippleYZ" src="https://github.com/user-attachments/assets/90ecf22c-c4c1-4ee9-8096-fd5613fbb1a7" /> | 1D/2D effect will be rippled to 2D/3D (🚨)<br>Shrink: shrinks the original size towards Y and Z, towardsY: copies X into Y, towardsZ: copies XY into Z |
| RippleXZ 🧊 | ![RippleXZ](https://github.com/user-attachments/assets/0918efac-6367-420f-b0e3-d796d9551953) | <img width="320" alt="RippleXZ" src="https://github.com/user-attachments/assets/90ecf22c-c4c1-4ee9-8096-fd5613fbb1a7" /> | 1D/2D effect will be rippled to 2D/3D (🚨)<br>Shrink: shrinks the original size towards X and Z, towardsX: copies Y into X, towardsZ: copies XY into Z |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix table pipe style (trailing pipe).

Markdownlint flags this row for trailing pipe usage; align with the project’s leading_only style.

📝 Proposed fix
-| RippleXZ 🧊 | ![RippleXZ](https://github.com/user-attachments/assets/0918efac-6367-420f-b0e3-d796d9551953) | <img width="320" alt="RippleXZ" src="https://github.com/user-attachments/assets/90ecf22c-c4c1-4ee9-8096-fd5613fbb1a7" /> | 1D/2D effect will be rippled to 2D/3D (🚨)<br>Shrink: shrinks the original size towards X and Z, towardsX: copies Y into X, towardsZ: copies XY into Z |
+| RippleXZ 🧊 | ![RippleXZ](https://github.com/user-attachments/assets/0918efac-6367-420f-b0e3-d796d9551953) | <img width="320" alt="RippleXZ" src="https://github.com/user-attachments/assets/90ecf22c-c4c1-4ee9-8096-fd5613fbb1a7" /> | 1D/2D effect will be rippled to 2D/3D (🚨)<br>Shrink: shrinks the original size towards X and Z, towardsX: copies Y into X, towardsZ: copies XY into Z
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

25-25: Table pipe style
Expected: leading_only; Actual: leading_and_trailing; Unexpected trailing pipe

(MD055, table-pipe-style)

🤖 Prompt for AI Agents
In `@docs/moonlight/modifiers.md` at line 25, The table row for "RippleXZ" in
modifiers.md uses a trailing pipe which violates the project's markdownlint
`leading_only` style; edit the row containing the "RippleXZ" entry (the line
with the image links and description) to remove the final trailing pipe and
ensure the row uses leading pipes only (no trailing |), and scan adjacent table
rows to keep consistent leading_only table formatting.


🚨: some effects already do this theirselves e.g. FreqMatrix runs on 1D but copies to 2D and 3D if size allows.
9 changes: 9 additions & 0 deletions firmware/esp32-d0.ini
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,12 @@ build_flags = ${env.build_flags}
lib_deps = ${env.lib_deps}
; RAM: [=== ] 26.2% (used 85912 bytes from 327680 bytes)
; Flash: [======= ] 65.9% (used 2073762 bytes from 3145728 bytes)


[env:esp32-pico2]
extends = env:esp32dev
board = esp32-pico-devkitm-2 ; https://github.com/platformio/platform-espressif32/blob/master/boards/esp32-pico-devkitm-2.json
board_build.partitions = default_8MB.csv ; boards/ESP32_8MB.csv
build_flags = ${esp32-d0-base.build_flags}
-D HTTPD_STACK_SIZE=6144
lib_deps = ${esp32-d0-base.lib_deps}
Binary file added firmware/installer/images/esp32-d0-pico2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions firmware/installer/manifest_esp32-d0-pico2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "MoonLight on esp32-d0-pico2",
"version": "0.7.0",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"new_install_prompt_erase": true,
"new_install_immediately": false,
"builds": [
{
"chipFamily": "ESP32",
"name": "esp32-d0",
"image": "./images/esp32-d0-pico2.jpg",
"parts": [
{ "path": "./MoonLight_esp32-d0-pico2_0-7-0_webflash.bin", "offset": 0 }
]
}
]
Comment on lines +1 to +17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Check platformio.ini for APP_VERSION
find . -name "platformio.ini" -type f | head -5

Repository: MoonModules/MoonLight

Length of output: 81


🏁 Script executed:

# Look for webflash filename patterns in build scripts
rg -n "webflash|MoonLight.*0-7" --type-list | head -20

Repository: MoonModules/MoonLight

Length of output: 454


🏁 Script executed:

# List all manifest files to see the pattern
find . -name "manifest*.json" -type f

Repository: MoonModules/MoonLight

Length of output: 809


🏁 Script executed:

# Check the actual platformio.ini content
cat platformio.ini 2>/dev/null || echo "Not found at root"

Repository: MoonModules/MoonLight

Length of output: 15082


🏁 Script executed:

# Find and read the rename_fw.py script
find . -name "rename_fw.py" -type f

Repository: MoonModules/MoonLight

Length of output: 87


🏁 Script executed:

# Check the rename_fw.py script to understand binary naming
cat scripts/rename_fw.py 2>/dev/null || echo "Not found"

Repository: MoonModules/MoonLight

Length of output: 2925


🏁 Script executed:

# Check another manifest file to see if versions match
cat firmware/installer/manifest_esp32-d0.json | head -20

Repository: MoonModules/MoonLight

Length of output: 522


🏁 Script executed:

# Check a few manifest files for version patterns
for file in ./firmware/installer/manifest_esp32-d0.json ./firmware/installer/manifest_esp32-c3.json; do
  echo "=== $file ==="
  head -5 "$file"
done

Repository: MoonModules/MoonLight

Length of output: 486


Version mismatch: manifest shows 0.7.0 but platformio.ini defines 0.7.1.

The manifest version and binary filename must match the APP_VERSION defined in platformio.ini. The build script (rename_fw.py) generates binary filenames using APP_VERSION="0.7.1", converting dots to dashes (resulting in 0-7-1). However, the manifest references version 0.7.0 and a binary path with 0-7-0, causing the installer to fail when it cannot locate the expected binary file.

Proposed fix
 {
   "name": "MoonLight on esp32-d0-pico2",
-  "version": "0.7.0",
+  "version": "0.7.1",
   "home_assistant_domain": "esphome",
   "funding_url": "https://esphome.io/guides/supporters.html",
   "new_install_prompt_erase": true,
   "new_install_immediately": false,
   "builds": [
     {
       "chipFamily": "ESP32",
       "name": "esp32-d0",
       "image": "./images/esp32-d0-pico2.jpg",
       "parts": [
-        { "path": "./MoonLight_esp32-d0-pico2_0-7-0_webflash.bin", "offset": 0 }
+        { "path": "./MoonLight_esp32-d0-pico2_0-7-1_webflash.bin", "offset": 0 }
       ]
     }
   ]
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"name": "MoonLight on esp32-d0-pico2",
"version": "0.7.0",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"new_install_prompt_erase": true,
"new_install_immediately": false,
"builds": [
{
"chipFamily": "ESP32",
"name": "esp32-d0",
"image": "./images/esp32-d0-pico2.jpg",
"parts": [
{ "path": "./MoonLight_esp32-d0-pico2_0-7-0_webflash.bin", "offset": 0 }
]
}
]
{
"name": "MoonLight on esp32-d0-pico2",
"version": "0.7.1",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"new_install_prompt_erase": true,
"new_install_immediately": false,
"builds": [
{
"chipFamily": "ESP32",
"name": "esp32-d0",
"image": "./images/esp32-d0-pico2.jpg",
"parts": [
{ "path": "./MoonLight_esp32-d0-pico2_0-7-1_webflash.bin", "offset": 0 }
]
}
]
}
🤖 Prompt for AI Agents
In `@firmware/installer/manifest_esp32-d0-pico2.json` around lines 1 - 17, The
manifest version and binary path are out of sync with APP_VERSION; update the
"version" field from "0.7.0" to "0.7.1" and change the binary filename in the
"parts" entry from "MoonLight_esp32-d0-pico2_0-7-0_webflash.bin" to
"MoonLight_esp32-d0-pico2_0-7-1_webflash.bin" (match the rename_fw.py convention
of replacing dots with dashes), so the manifest's version string and the
referenced firmware image name align with APP_VERSION defined in platformio.ini.

}
2 changes: 1 addition & 1 deletion misc/livescripts/E_lines.sc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
void loop() {
fadeToBlackBy(255);
fadeToBlackBy(100);
int x = millis() / 100;
for (int y = 0; y < height; y++) {
setRGB(y*width+x%width, CRGB(255,0,0));
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ build_flags =
-D BUILD_TARGET=\"$PIOENV\"
-D APP_NAME=\"MoonLight\" ; 🌙 Must only contain characters from [a-zA-Z0-9-_] as this is converted into a filename
-D APP_VERSION=\"0.7.1\" ; semver compatible version string
-D APP_DATE=\"20260113\" ; 🌙
-D APP_DATE=\"20260115\" ; 🌙

-D PLATFORM_VERSION=\"pioarduino-55.03.35\" ; 🌙 make sure it matches with above plaftform

Expand Down
103 changes: 65 additions & 38 deletions src/MoonBase/Modules/ModuleIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ enum IO_PinUsageEnum {

enum IO_BoardsEnum {
board_none, //
board_QuinLEDDig2Go,
board_QuinLEDDigNext2,
board_QuinLEDDigUnoV3,
board_QuinLEDDigQuadV3,
board_QuinLEDDigOctaV2,
board_QuinLEDDig2Go,
// board_QuinLEDPenta,
// board_QuinLEDPentaPlus,
board_SergUniShieldV5,
Expand Down Expand Up @@ -114,10 +115,11 @@ class ModuleIO : public Module {
control = addControl(controls, "boardPreset", "select");
control["default"] = 0;
addControlValue(control, BUILD_TARGET); // 0 none
addControlValue(control, "QuinLED Dig2Go");
addControlValue(control, "QuinLED DigNext2");
addControlValue(control, "QuinLED Dig Uno v3");
addControlValue(control, "QuinLED Dig Quad v3");
addControlValue(control, "QuinLED Dig Octa v2");
addControlValue(control, "QuinLED Dig2Go");
addControlValue(control, "Serg Universal Shield");
addControlValue(control, "Serg Mini Shield");
addControlValue(control, "Mathieu SE16 v1");
Expand Down Expand Up @@ -330,42 +332,6 @@ class ModuleIO : public Module {
pinAssigner.assignPin(10, pin_PHY_CS); // WIZ850IO nCS
pinAssigner.assignPin(45, pin_PHY_IRQ); // WIZ850IO nINT
pinAssigner.assignPin(4, pin_Infrared);
} else if (boardID == board_QuinLEDDigUnoV3) {
// Dig-Uno-V3
// esp32-d0 (4MB)
object["maxPower"] = 50; // max 75, but 10A fuse
pinAssigner.assignPin(16, pin_LED);
pinAssigner.assignPin(3, pin_LED);
pinAssigner.assignPin(0, pin_ButtonPush);
pinAssigner.assignPin(15, pin_Relay);
// pinAssigner.assignPin(2, pin_I2S_SD);
// pinAssigner.assignPin(12, pin_I2S_WS);
// pinAssigner.assignPin(13, pin_Temperature);
// pinAssigner.assignPin(15, pin_I2S_SCK);
// pinAssigner.assignPin(16, pin_LED_03);
// pinAssigner.assignPin(32, pin_Exposed);
} else if (boardID == board_QuinLEDDigQuadV3) {
// Dig-Quad-V3
// esp32-d0 (4MB)
object["maxPower"] = 150;
uint8_t ledPins[] = {16, 3, 1, 4}; // LED_PINS
for (uint8_t gpio : ledPins) pinAssigner.assignPin(gpio, pin_LED);
pinAssigner.assignPin(0, pin_ButtonPush);

pinAssigner.assignPin(15, pin_Relay);

// pinAssigner.assignPin(2, pin_I2S_SD;
// pinAssigner.assignPin(12, pin_I2S_WS;
// pinAssigner.assignPin(13, pin_Temperature;
// pinAssigner.assignPin(15, pin_I2S_SCK;
// pinAssigner.assignPin(32, pin_Exposed;
} else if (boardID == board_QuinLEDDigOctaV2) {
// Dig-Octa-32-8L
object["maxPower"] = 400; // 10A Fuse * 8 ... 400 W
uint8_t ledPins[] = {0, 1, 2, 3, 4, 5, 12, 13}; // LED_PINS
for (uint8_t gpio : ledPins) pinAssigner.assignPin(gpio, pin_LED);
pinAssigner.assignPin(33, pin_Relay);
pinAssigner.assignPin(34, pin_ButtonPush);
} else if (boardID == board_QuinLEDDig2Go) {
// dig2go
object["maxPower"] = 10; // USB powered: 2A / 10W
Expand Down Expand Up @@ -402,6 +368,62 @@ class ModuleIO : public Module {
// pinAssigner.assignPin(16, pin_I2C_SCL);
// pinAssigner.assignPin(13, pin_Relay_LightsOn);
// pinAssigner.assignPin(5, pin_LED);
} else if (boardID == board_QuinLEDDigNext2) {
// digNext2
object["maxPower"] = 65;
pinAssigner.assignPin(2, pin_LED);
pinAssigner.assignPin(4, pin_LED);
pinAssigner.assignPin(5, pin_Relay_LightsOn);
pinAssigner.assignPin(20, pin_Relay_LightsOn);
pinAssigner.assignPin(21, pin_Relay_LightsOn);
pinAssigner.assignPin(22, pin_Relay_LightsOn);
pinAssigner.assignPin(7, pin_I2S_SD);
pinAssigner.assignPin(8, pin_I2S_WS);
// pinAssigner.assignPin(?, pin_I2S_SCK);
pinAssigner.assignPin(15, pin_I2C_SDA);
pinAssigner.assignPin(14, pin_I2C_SCL);
pinAssigner.assignPin(34, pin_Button_Push_LightsOn);
pinAssigner.assignPin(35, pin_ButtonPush);
pinAssigner.assignPin(0, pin_Exposed);
pinAssigner.assignPin(25, pin_Exposed);
pinAssigner.assignPin(32, pin_Exposed);
pinAssigner.assignPin(33, pin_Exposed);
} else if (boardID == board_QuinLEDDigUnoV3) {
// Dig-Uno-V3
// esp32-d0 (4MB)
object["maxPower"] = 50; // max 75, but 10A fuse
pinAssigner.assignPin(16, pin_LED);
pinAssigner.assignPin(3, pin_LED);
pinAssigner.assignPin(0, pin_ButtonPush);
pinAssigner.assignPin(15, pin_Relay);
// pinAssigner.assignPin(2, pin_I2S_SD);
// pinAssigner.assignPin(12, pin_I2S_WS);
// pinAssigner.assignPin(13, pin_Temperature);
// pinAssigner.assignPin(15, pin_I2S_SCK);
// pinAssigner.assignPin(16, pin_LED_03);
// pinAssigner.assignPin(32, pin_Exposed);
} else if (boardID == board_QuinLEDDigQuadV3) {
// Dig-Quad-V3
// esp32-d0 (4MB)
object["maxPower"] = 150;
uint8_t ledPins[] = {16, 3, 1, 4}; // LED_PINS
for (uint8_t gpio : ledPins) pinAssigner.assignPin(gpio, pin_LED);
pinAssigner.assignPin(0, pin_ButtonPush);

pinAssigner.assignPin(15, pin_Relay);

// pinAssigner.assignPin(2, pin_I2S_SD;
// pinAssigner.assignPin(12, pin_I2S_WS;
// pinAssigner.assignPin(13, pin_Temperature;
// pinAssigner.assignPin(15, pin_I2S_SCK;
// pinAssigner.assignPin(32, pin_Exposed;
} else if (boardID == board_QuinLEDDigOctaV2) {
// Dig-Octa-32-8L
object["maxPower"] = 400; // 10A Fuse * 8 ... 400 W
uint8_t ledPins[] = {0, 1, 2, 3, 4, 5, 12, 13}; // LED_PINS
for (uint8_t gpio : ledPins) pinAssigner.assignPin(gpio, pin_LED);
pinAssigner.assignPin(33, pin_Relay);
pinAssigner.assignPin(34, pin_ButtonPush);
} else if (boardID == board_SergMiniShield) {
object["maxPower"] = 50; // 10A Fuse ...
pinAssigner.assignPin(16, pin_LED);
Expand Down Expand Up @@ -605,6 +627,11 @@ class ModuleIO : public Module {
}

void readPins() {
if (safeModeMB) {
EXT_LOGW(ML_TAG, "Safe mode enabled, not adding pins");
return;
}

uint8_t pinRS485TX = UINT8_MAX;
uint8_t pinRS485RX = UINT8_MAX;
uint8_t pinRS485DE = UINT8_MAX;
Expand Down
2 changes: 1 addition & 1 deletion src/MoonBase/Nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void Node::updateControl(const JsonObject& control) {
// if (oldValue == "") return; // newControl, value already set
if (!control["name"].isNull() && !control["type"].isNull() && !control["p"].isNull()) { // name and type can be null if control is removed in compareRecursive
int pointer = control["p"];
// EXT_LOGD(ML_TAG, "%s = %s t:%s p:%p", control["name"].as<const char*>(), control["value"].as<String>().c_str(), control["type"].as<const char*>(), (void*)pointer);
EXT_LOGD(ML_TAG, "%s = %s t:%s p:%p", control["name"].as<const char*>(), control["value"].as<String>().c_str(), control["type"].as<const char*>(), (void*)pointer);

if (pointer) {
if (control["type"] == "slider" || control["type"] == "select" || control["type"] == "pin" || control["type"] == "number") {
Expand Down
2 changes: 1 addition & 1 deletion src/MoonBase/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool copyFile(const char* srcPath, const char* dstPath) {
size_t n;
while ((n = src.read(buf, sizeof(buf))) > 0) {
if (dst.write(buf, n) != n) {
Serial.println("Write failed!");
EXT_LOGE(MB_TAG, "Write failed!");
src.close();
dst.close();
return false;
Expand Down
Loading