Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
24 changes: 19 additions & 5 deletions docs/moonbase/inputoutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Currently the following boards are defined. Not all are supported yet 🚧

For each board the following presets are defined:

* Modded: if any change to the default preset is made.
* Modded: if any change to the default preset is made. Press off to go back to standard. If any pin is not default, modded will be set.
* Max Power in Watts: adjust the brightness to approach this max power, depending on the number of LEDs used. Default 10: 5V * 2A = 10W (so it runs fine on USB). Used by LED drivers, see [Drivers](../../moonlight/drivers/)
* Jumper1: If the board contains a jumper, it can define pin behaviour. Eg. select between Infrared and Ethernet.
* Pins: This module is the central place to assign functionality to gpio pins. Other modules and nodes use the pin assignments made here.
* Pins: Assign functionality to gpio pins. Other modules and nodes use the pin assignments made here.
* GPIO = gpio_num;
* Usage: See below
* Index: specify first, second, third, ... usage output, e.g. LED D01 to LED D16
Expand Down Expand Up @@ -56,14 +56,28 @@ For each board the following presets are defined:
![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"}

* Dig 2Go, Dig Uno, Dig Quad: Choose the esp32-d0 (4MB) board in the [MoonLight Installer](../../gettingstarted/installer/)
* Dig Octa: Choose the esp32-d0-16mb board in the [MoonLight Installer](../../gettingstarted/installer/)
* [Dig 2Go](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/)
* [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).
* You might need to reset your router if you first run WLED on the same MCU and no new IP is assigned.
* After install, select the QuinLED board preset to have the pins assigned correctly.

!!! tip "Reset router"
You might need to reset your router if you first run WLED on the same board and no new IP is assigned.

!!! Tip "Dig Uno USB"
Remove fuse to connect USB cable to flash the board.

### MyHome-Control ESP32-P4 shield

* Choose the esp32-p4-nano board in the [MoonLight Installer](../../gettingstarted/installer/)
* On new boards, the WiFi coprocessor needs to be updated first to a recent version, currently v2.0.17, see the link in the [MoonLight Installer](../../gettingstarted/installer/)
* After install, select the MHC P4 shield board preset to have the pins assigned correctly.
* Add the Parallel LED Driver, see [Drivers](). It uses @troyhacks his parallel IO driver to drive all the 12 LED pins of the P4 shield.

![ESP32-P4 shield](https://shop.myhome-control.de/thumbnail/87/41/c2/1762031307/WLED_ESP32_P4_Shield_02_1920x1326.jpg?ts=1762031315){: style="width:320px"}

[ESP32-P4 shield](https://shop.myhome-control.de/en/ABC-WLED-ESP32-P4-shield/HW10027)

### SE16 v1

![SE-16p](../firmware/installer/images/esp32-s3-stephanelec-16p.jpg){: style="width:100px"}
Expand Down
2 changes: 2 additions & 0 deletions docs/moonlight/drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The Drivers module defines layers and drivers.
* Audio driver
* Sensor drivers (microphone, gyro, MIDI controller)

Layouts need to be defined before drivers as the driver takes the layouts defined before itself, e.g. to define which LEDs to drive on which pins.

## Controls

* Nodes: a list of Layouts and Drivers
Expand Down
4 changes: 2 additions & 2 deletions firmware/esp32-p4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ lib_deps =
; platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
; board = ESP32-P4 ; https://github.com/pioarduino/platform-espressif32/blob/565f02434cd38858a59b7a010c950ffb2bec51df/boards/esp32-p4.json#L24
board = esp32-p4-evboard ; https://github.com/pioarduino/platform-espressif32/blob/565f02434cd38858a59b7a010c950ffb2bec51df/boards/esp32-p4-evboard.json
platform_packages = framework-arduinoespressif32 @ https://github.com/troyhacks/arduino-esp32#feature/esp32p4
framework-arduinoespressif32-libs @ https://github.com/troyhacks/esp32-arduino-libs#main
; platform_packages = framework-arduinoespressif32 @ https://github.com/troyhacks/arduino-esp32#feature/esp32p4
; framework-arduinoespressif32-libs @ https://github.com/troyhacks/esp32-arduino-libs#main
board_build.partitions = default_16MB.csv ;boards/ESP32_8MB.csv
upload_speed = 921600
; framework = arduino
Expand Down
5 changes: 3 additions & 2 deletions interface/src/lib/types/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ export type StaticSystemInformation = {
flash_chip_size: number;
flash_chip_speed: number;
cpu_reset_reason: string;
heap_info_app: string;
heap_info_dma: string;
heap_info_app: string; // 🌙
heap_info_dma: string; // 🌙
coprocessor?: string; // 🌙 optional as only for ESP32-P4
};

export type SystemInformation = Analytics & StaticSystemInformation;
Expand Down
15 changes: 15 additions & 0 deletions interface/src/routes/system/status/SystemStatus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,21 @@
</div>
</div>

<!-- 🌙 -->
{#if systemInformation.coprocessor}
<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
<div class="mask mask-hexagon bg-primary h-auto w-10 flex-none">
<CPU class="text-primary-content h-auto w-full scale-75" />
</div>
<div>
<div class="font-bold">Coprocessor</div>
<div class="text-sm opacity-75">
{systemInformation.coprocessor}
</div>
</div>
</div>
{/if}

<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
<div class="mask mask-hexagon bg-primary h-auto w-10 flex-none">
<Speed class="text-primary-content h-auto w-full scale-75" />
Expand Down
16 changes: 14 additions & 2 deletions lib/framework/SystemStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@
#include "esp32c6/rom/rtc.h"
#define ESP_TARGET "ESP32-C6";
#elif CONFIG_IDF_TARGET_ESP32P4 // 🌙
#include "esp32p4/rom/rtc.h"
#define ESP_TARGET "ESP32-P4";
#include "esp32p4/rom/rtc.h"
#define ESP_TARGET "ESP32-P4";
#include "esp_hosted_api_types.h"
#include <esp_hosted.h>
// #include "esp_hosted_host_fw_ver.h"
// #include "esp_hosted_misc.h"
// #include "esp_hosted_ota.h"
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
Expand Down Expand Up @@ -169,6 +174,13 @@ esp_err_t SystemStatus::systemStatus(PsychicRequest *request)
root["core_temp"] = temperatureRead();
root["cpu_reset_reason"] = verbosePrintResetReason(esp_reset_reason());
root["uptime"] = millis() / 1000;
#ifdef CONFIG_IDF_TARGET_ESP32P4
esp_hosted_coprocessor_fwver_t c6_fw_version;
esp_hosted_get_coprocessor_fwversion(&c6_fw_version);
char coprocessor[10];
snprintf(coprocessor, sizeof(coprocessor), "v%d.%d.%d", c6_fw_version.major1, c6_fw_version.minor1, c6_fw_version.patch1);
root["coprocessor"] = coprocessor;
#endif

heapHealth(root["heap_info_app"].to<JsonVariant>(), MALLOC_CAP_INTERNAL);
heapHealth(root["heap_info_dma"].to<JsonVariant>(), MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA);
Expand Down
Loading