Skip to content

Commit c200c3f

Browse files
committed
Installer updates, Toronto Cubes to Gourds
1 parent cc8c4da commit c200c3f

File tree

6 files changed

+48
-49
lines changed

6 files changed

+48
-49
lines changed

docs/gettingstarted/installer.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# MoonLight Installer
22

3-
This page describes how to install <a href="https://github.com/MoonModules/MoonLight" target="_blank">MoonModules/MoonLight</a> on an ESP32 microcontroller. You need a compatible browser like Chrome, or Edge, not supported on Safari.
3+
Install <a href="https://github.com/MoonModules/MoonLight" target="_blank">MoonModules/MoonLight</a> on an ESP32 microcontroller. You need a compatible browser like Chrome, or Edge, not supported on Safari.
4+
5+
For devices which have already MoonLight installed, go to [Update](#update-moonlight)
46

57
<a href="https://www.youtube.com/watch?v=7DQOEWa-Kwg">
68
<img width="380" src="https://img.youtube.com/vi/7DQOEWa-Kwg/maxresdefault.jpg" alt="Watch MoonLight Demo">
79
</a>
810

9-
**[▶️ Watch the install tutorial](https://www.youtube.com/watch?v=7DQOEWa-Kwg)** or follow the instructions below
11+
**[▶️ Watch the install tutorial](https://www.youtube.com/watch?v=7DQOEWa-Kwg)** (v0.6.0) or follow the instructions below
1012

1113
## Prepare an ESP32 device
1214

@@ -22,12 +24,7 @@ Connect the device via a USB cable (which supports data transfer) to your PC.
2224

2325
<script type="module" src="https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module"></script>
2426

25-
Select your ESP32-device from the table below and press the corresponding Connect button.
26-
27-
* In the popup window, your device should show up in this list, press Connect,
28-
* Press Install MoonLight. Erase when installing MoonLight first time, do not erase if already installed (to preserve settings). Press Next and Install
29-
* Press Next, go to Logs & Console and press Restart.
30-
* Close the installer.
27+
Select your ESP32-device from the table below, press the corresponding **Connect** button and follow the steps. Your device should show up in this list. Press the **Erase** checkbox when installing MoonLight for the first time. After succesful install, go to Logs & Console, press **Restart** and close the installer.
3128

3229
!!! info "Bootloader mode"
3330
If install doesn't work: some boards have to be placed in bootloader mode the first time: press and hold the `Boot` button on the ESP32, press the `Reset` button on the ESP32 and then release the `Boot` button.
@@ -46,10 +43,10 @@ Select your ESP32-device from the table below and press the corresponding Connec
4643
| esp32-c3 | ![esp32-c3](../firmware/installer/images/esp32-c3.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-c3.json"></esp-web-install-button> | [Ali*](https://s.click.aliexpress.com/e/_EIl7NKw){:target="_blank"} |
4744
| esp32-c3-supermini | ![esp32-c3-supermini](../firmware/installer/images/esp32-c3-supermini.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-c3-supermini.json"></esp-web-install-button> | [Ali*](https://s.click.aliexpress.com/e/_EIl7NKw){:target="_blank"} |
4845

49-
Installer steps:
46+
Install steps in pictures:
5047

5148
<img width="250" src="https://github.com/user-attachments/assets/f092743f-a362-40da-b932-d31b203d966d" />
52-
<img width="200" alt="Screenshot 2025-06-07 at 20 54 31" src="https://github.com/user-attachments/assets/a0a8d92c-dae2-4cfe-ac78-bc7cacb24724" />
49+
<img width="200" src="https://github.com/user-attachments/assets/a0a8d92c-dae2-4cfe-ac78-bc7cacb24724" />
5350
<img width="250" src="https://github.com/user-attachments/assets/35045317-520d-427c-894e-418693877831" />
5451
<img width="200" src="https://github.com/user-attachments/assets/25c05a6c-d2ef-41cb-b83c-fc40a60c6ccc" />
5552
<img width="200" src="https://github.com/user-attachments/assets/b2391752-51c4-400e-b95c-4fa865e93595" />
@@ -81,23 +78,23 @@ Go back to your home WiFi open a browser and enter hostname.local to open MoonLi
8178

8279
### IO Board Presets
8380

84-
Select the specific board you are running in [Module IO](../../moonbase/inputoutput), e.g. premade or custom boards as shown in [hardware](../hardware).
81+
Select your board in [Module IO](../../moonbase/inputoutput), if you have one of the premade boards supported (see above table), select this. If not sure, leave it as is.
8582

86-
<img width="320" height="441" alt="io11" src="../../media/moonbase/inputoutput.png" />
83+
<img width="320" height="441" src="../../media/moonbase/inputoutput.png" />
8784

8885
Make sure the defined LED pin(s) are the same as the physical connections on the ESP32 board.
8986

9087
### Drivers
9188

9289
The drivers module contains [Layouts](../../moonlight/layouts) and [Drivers](../../moonlight/drivers).
9390

94-
Add a layout first, this defines how your LEDs are arranged. Press (+)
91+
Layouts define how your LEDs are arranged. Add a layout first, Press (+)
9592

96-
<img width="350" src="https://github.com/user-attachments/assets/8d8b9c2d-bed3-439e-a145-2bb204639c6c" />
93+
<img width="320" src="../../media/moonlight/layouts/PanelLayout.png"/>
9794

9895
For LED strips, choose Single Column, for Panels choose Panel(s) or other layouts. Layouts are recognized by 🚥. Enter the size of your LEDs
9996

100-
Add the LED driver by pressing the blue + button and select the Physical LED driver or FastLED driver. Drivers are recognized by ☸️
97+
Next add a LED driver by pressing the (+) button and select the Physical LED driver or FastLED driver. Drivers are recognized by ☸️
10198

10299
<img width="350" src="https://github.com/user-attachments/assets/e7fab24f-3803-4aa5-8638-459cca8a9caf" />
103100

@@ -109,6 +106,8 @@ The Effects module contains [Effects](../../moonlight/effects) and [Modifiers](.
109106

110107
The effect should be visible on the Monitor in MoonLight and on your LEDs
111108

109+
<img width="320" src="../../media/moonlight/effects/LissajousShot.png"/>
110+
112111
### Save and next steps
113112

114113
Press save (💾). Saves your setup to the file system, so if a device is restarted, your settings are still there.
6.28 KB
Loading
7.97 KB
Loading

docs/moonlight/layouts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Want to add a a Layout to MoonLight, see [develop](https://moonmodules.org/MoonL
2323
| Rings | ![Ring](https://github.com/user-attachments/assets/7f60871d-30aa-4ad4-8966-cdc9c035c034) | <img width="320" alt="Rings" src="https://github.com/user-attachments/assets/ee2165aa-cf01-48cd-9310-9cfde871ac33" /> | 241 LEDs in 9 rings |
2424
| Wheel | ![Wheel](https://github.com/user-attachments/assets/52a63203-f955-4345-a97b-edb0b8691fe1) | <img width="320" alt="Wheel" src="https://github.com/user-attachments/assets/7b83e30b-e2e1-49e6-ad80-5b6925b23018" /> | |
2525
| Human Sized Cube | ![HCS](https://github.com/user-attachments/assets/8e475f9d-ab7a-4b5c-835a-e0b4ddc28f0f) | <img width="320" alt="HCS" src="https://github.com/user-attachments/assets/de1eb424-6838-4af4-8652-89a54929bb03" /> | |
26-
| Toronto Bar Cubes | ![cubes](../../media/moonlight/effects/lines.gif) | <img width="320" alt="cubes" src="../../media/moonlight/layouts/CeilingCubesControls.png"/> | |
26+
| Toronto Bar Gourds | ![gourds](../../media/moonlight/effects/lines.gif) | <img width="320" alt="gourds" src="../../media/moonlight/layouts/CeilingCubesControls.png"/> | |
2727
| Single Column | ![Single column](https://github.com/user-attachments/assets/a88cea0f-9227-4da4-9a43-b944fd8bef97) | <img width="320" alt="Single column" src="https://github.com/user-attachments/assets/9f9918b9-e1ee-43a8-a02d-7f1ee182888b" /> | Choose Single Column for LED strips |
2828
| Single Row | ![Single row](https://github.com/user-attachments/assets/4ba5a3ac-9312-4bac-876d-cfa3dce41215) | <img width="320" alt="Single row" src="https://github.com/user-attachments/assets/70455279-646c-467d-b8e5-492b1aeae0fa" /> | |
2929
| SE16 | ![SE16](https://github.com/user-attachments/assets/45c7bec7-2386-4c42-8f24-5a57b87f0df9) | <img width="320" alt="SE16" src="https://github.com/user-attachments/assets/0efe941a-acf5-4a2c-a7d6-bdfa91574d1a" /> | Layout(s) including pins for Stephan Electronics 16-Pin ESP32-S3 board<br>see below |

src/MoonLight/Modules/ModuleDrivers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ModuleDrivers : public NodeManager {
8484
addControlValue(control, getNameAndTags<PanelsLayout>());
8585
addControlValue(control, getNameAndTags<CubeLayout>());
8686
addControlValue(control, getNameAndTags<HumanSizedCubeLayout>());
87-
addControlValue(control, getNameAndTags<TorontoBarCubesLayout>());
87+
addControlValue(control, getNameAndTags<TorontoBarGourdsLayout>());
8888
addControlValue(control, getNameAndTags<RingLayout>());
8989
addControlValue(control, getNameAndTags<Rings16Layout>());
9090
addControlValue(control, getNameAndTags<RingsLayout>());
@@ -125,7 +125,7 @@ class ModuleDrivers : public NodeManager {
125125
if (!node) node = checkAndAlloc<WheelLayout>(name);
126126
if (!node) node = checkAndAlloc<SpiralLayout>(name);
127127
if (!node) node = checkAndAlloc<HumanSizedCubeLayout>(name);
128-
if (!node) node = checkAndAlloc<TorontoBarCubesLayout>(name);
128+
if (!node) node = checkAndAlloc<TorontoBarGourdsLayout>(name);
129129
if (!node) node = checkAndAlloc<SingleRowLayout>(name);
130130
if (!node) node = checkAndAlloc<SingleColumnLayout>(name);
131131

src/MoonLight/Nodes/Layouts/L_MoonLight.h

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -241,68 +241,68 @@ class CubeLayout : public Node {
241241
}
242242
};
243243

244-
class TorontoBarCubesLayout : public Node {
244+
class TorontoBarGourdsLayout : public Node {
245245
public:
246-
static const char* name() { return "Toronto Bar Cubes"; }
246+
static const char* name() { return "Toronto Bar Gourds"; }
247247
static uint8_t dim() { return _3D; }
248248
static const char* tags() { return "🚥"; }
249249

250250
// Coord3D size;
251-
uint8_t nrOfLightsPerCube = 61; // 5*12+1; mode 0 only
251+
uint8_t nrOfLightsPerGourd = 61; // 5*12+1; mode 0 only
252252
uint8_t granularity = 0;
253253

254254
void setup() override {
255255
addControl(granularity, "granularity", "select");
256-
addControlValue("One Cube One Light");
256+
addControlValue("One Gourd One Light");
257257
addControlValue("One Side One Light");
258258
addControlValue("One LED One Light");
259-
addControl(nrOfLightsPerCube, "nrOfLightsPerCube", "slider", 1, 128, "One cube"); // mode 0 only
259+
addControl(nrOfLightsPerGourd, "nrOfLightsPerGourd", "slider", 1, 128, "One gourd"); // mode 0 only
260260
}
261261

262-
// One Cube One Light
263-
void addCube(Coord3D pos) {
264-
for (int i = 0; i < nrOfLightsPerCube; i++) addLight(Coord3D(pos.x, pos.y, pos.z)); // all cube lights on the same position for the time being
262+
// One Gourd One Light
263+
void addGourd(Coord3D pos) {
264+
for (int i = 0; i < nrOfLightsPerGourd; i++) addLight(Coord3D(pos.x, pos.y, pos.z)); // all gourd lights on the same position for the time being
265265
}
266266

267267
// One Side One Light
268-
void addCubeSides(Coord3D pos) {
269-
const uint8_t cubeLength = 3; // each side can be mapped in a 3 * 3 * 3 grid (27 leds), 5 sides + 1 middle LED
268+
void addGourdSides(Coord3D pos) {
269+
const uint8_t gourdLength = 3; // each side can be mapped in a 3 * 3 * 3 grid (27 leds), 5 sides + 1 middle LED
270270
Coord3D sides[] = {Coord3D(1, 1, 0), Coord3D(2, 1, 1), Coord3D(1, 1, 2), Coord3D(0, 1, 1), Coord3D(1, 2, 1)};
271271

272272
for (Coord3D side : sides) { // 5 sides
273-
for (int i = 0; i < 12; i++) addLight(Coord3D(pos.x * cubeLength + side.x, pos.y * cubeLength + side.y, pos.z * cubeLength + side.z)); // each side has 12 leds, all mapped to the same virtual pixel
273+
for (int i = 0; i < 12; i++) addLight(Coord3D(pos.x * gourdLength + side.x, pos.y * gourdLength + side.y, pos.z * gourdLength + side.z)); // each side has 12 leds, all mapped to the same virtual pixel
274274
}
275275

276276
// + middleLED
277277
Coord3D side = {1, 1, 1};
278-
addLight(Coord3D(pos.x * cubeLength + side.x, pos.y * cubeLength + side.y, pos.z * cubeLength + side.z)); // middleLED
278+
addLight(Coord3D(pos.x * gourdLength + side.x, pos.y * gourdLength + side.y, pos.z * gourdLength + side.z)); // middleLED
279279
}
280280

281281
// One LED One Light
282-
void addCubePixels(Coord3D pos) {
283-
const uint8_t cubeLength = 7;
282+
void addGourdPixels(Coord3D pos) {
283+
const uint8_t gourdLength = 7;
284284
Coord3D pixels[] = {Coord3D(0, 0), Coord3D(1, 0), Coord3D(2, 0), Coord3D(3, 0), Coord3D(3, 1), Coord3D(3, 2), Coord3D(3, 3), Coord3D(2, 3), Coord3D(1, 3), Coord3D(0, 3), Coord3D(0, 2), Coord3D(0, 1)}; // 12 pixels each
285285

286286
// back and front: z constant, increasing x and y
287-
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * cubeLength + pixel.x, pos.y * cubeLength + pixel.y, pos.z * cubeLength)); // front
288-
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * cubeLength + pixel.x, pos.y * cubeLength + pixel.y, pos.z * cubeLength + cubeLength - 1)); // back
287+
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * gourdLength + pixel.x, pos.y * gourdLength + pixel.y, pos.z * gourdLength)); // front
288+
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * gourdLength + pixel.x, pos.y * gourdLength + pixel.y, pos.z * gourdLength + gourdLength - 1)); // back
289289

290290
// left and right: x constant, increasing y and z
291-
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * cubeLength, pos.y * cubeLength + pixel.x, pos.z * cubeLength + pixel.y)); // left
292-
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * cubeLength + cubeLength - 1, pos.y * cubeLength + pixel.x, pos.z * cubeLength + pixel.y)); // right
291+
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * gourdLength, pos.y * gourdLength + pixel.x, pos.z * gourdLength + pixel.y)); // left
292+
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * gourdLength + gourdLength - 1, pos.y * gourdLength + pixel.x, pos.z * gourdLength + pixel.y)); // right
293293

294294
// bottom : y constant: increasing x and z
295-
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * cubeLength + pixel.x, pos.y * cubeLength + cubeLength - 1, pos.z * cubeLength + pixel.y)); // bottom
295+
for (Coord3D pixel : pixels) addLight(Coord3D(pos.x * gourdLength + pixel.x, pos.y * gourdLength + gourdLength - 1, pos.z * gourdLength + pixel.y)); // bottom
296296

297297
// + middleLED
298298
Coord3D middle = {3, 3, 3};
299-
addLight(Coord3D(pos.x * cubeLength + middle.x, pos.y * cubeLength + middle.y, pos.z * cubeLength + middle.z)); // middleLED
299+
addLight(Coord3D(pos.x * gourdLength + middle.x, pos.y * gourdLength + middle.y, pos.z * gourdLength + middle.z)); // middleLED
300300
}
301301

302302
bool hasOnLayout() const override { return true; }
303303
void onLayout() override {
304-
// modify to whatever cube order and nr of cubes in a 3D grid space
305-
Coord3D cubes[] = {
304+
// modify to whatever gourd order and nr of gourds in a 3D grid space
305+
Coord3D gourds[] = {
306306
//
307307
Coord3D(0, 0, 0),
308308
Coord3D(1, 0, 0),
@@ -335,22 +335,22 @@ class TorontoBarCubesLayout : public Node {
335335
Coord3D(3, 2, 1) //
336336
};
337337

338-
uint8_t cubeCounter = 0;
338+
uint8_t gourdCounter = 0;
339339

340-
for (Coord3D cube : cubes) {
341-
if (granularity == 0) { // one cube one light
342-
addCube(cube);
340+
for (Coord3D gourd : gourds) {
341+
if (granularity == 0) { // one gourd one light
342+
addGourd(gourd);
343343
} else if (granularity == 1) { // one side one light
344-
addCubeSides(cube);
344+
addGourdSides(gourd);
345345
} else if (granularity == 2) { // one LED one light
346-
addCubePixels(cube);
346+
addGourdPixels(gourd);
347347
}
348348

349-
cubeCounter++;
350-
if (cubeCounter % 10 == 0) nextPin(); // will not be used by Art-Net but in case of using a LED driver, every 10 cubes (61 LEDs each) will be on a separate pin
349+
gourdCounter++;
350+
if (gourdCounter % 10 == 0) nextPin(); // will not be used by Art-Net but in case of using a LED driver, every 10 gourds (61 LEDs each) will be on a separate pin
351351
}
352352

353-
if (cubeCounter % 10 != 0) nextPin(); // add final pin
353+
if (gourdCounter % 10 != 0) nextPin(); // add final pin
354354
}
355355
};
356356

0 commit comments

Comments
 (0)