Staijn1 / phos

Control your leds over wifi using a PWA Angular App
3 stars 0 forks source link

Angulon

Demo website (without ledstrip connected) is available at: https://demo.phos.steinjonker.nl

todo

What is Angulon?

Angulon is an application to control a WS2812B ledstrip using an ESP32 microcontroller.
The front-end is made in Angular which serves a manifest, so it can be installed as a PWA

Features

Getting started with source code

ESP Module

First, buy an ESP32 module, and a WS2812B ledstrip.
I'm not going to go into detail about power, because ledstrips use too much power for the ESP to handle.
Connect the ledstrip on pin 12 on the ESP.

Download the Arduino IDE and follow this tutorial

Generating migrations

To generate a migration, run npx nx run api:migration-generate --name=your-migration-name.
However keep in mind, TypeORM compares the current state of the database against the state of the detected entities.
If your database is already up-to-date (because synchronize was perhaps set to true), you will have to make sure the database is in the state of the last migration to successfully generate a new migration.
To do this, easiest is to drop the database and start the API (migrations are run automatically)

Running migrations

Run npx nx run api:migrations-run to execute all pending migrations. You can provide environment variables to this command to override the database connection properties.