Add Makefile and Markdown linter (#73)

* Add Makefile

* Update .gitignore to exclude venv

* Add requirements.txt for venv

* Add pymarkdown lint Github action

* Update .md from lint tool

* Update README with make commands

* Add linter config
This commit is contained in:
Adriaan Van Niekerk
2025-10-31 01:06:36 +02:00
committed by GitHub
parent bbe3bd79db
commit 0cd98c67e2
44 changed files with 524 additions and 279 deletions

View File

@@ -5,39 +5,22 @@ To circumvent this problem, it is now possible to control external LEDs, which t
<img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/intern_vs_external.jpg" width="700">
There is also a new [meter adapter](https://www.thingiverse.com/thing:5028229) available. This has two features: designed for **small clearings** in front of the meter and prepared for **WS2812 LEDs**.
<img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/Power_Meter_Mounted.jpg" width="500">
## 1. Hardware installation of the LED stripe
The control line of the LED stripe is connected with a 470 Ohm resistor to the GPIO12.
The control line of the LED stripe is connected with a 470 Ohm resistor to the GPIO12.
For power supply stabilization a capacitor between 5V and ground is recommended. Here a 470µF polymer capacitor is used. As a power supply a 5V from the ESP32 is used like in the following wiring.
<img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/install_external_led.jpg" width="500">
<img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/install_external_led.jpg" width="500">
## 2. Software configuration
The handling of the WS2812 LED controller needs some other libraries, therefore it is controlled within a dedicated section called `GPIO Settings`. The external LED stripe is connected to GPIO12. After activating the "GPIO Settings" section, the internal flash is per default disabled. In order to activate the external LED, you need to activate `GPIO 12 state` and select `"extern flash light ws281x ..."`.
<img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/external_GPIO_settings.jpg" width="700">
The handling of the WS2812 LED controller needs some other libraries, therefore it is controlled within a dedicated section called `GPIO Settings`. The external LED stripe is connected to GPIO12. After activating the "GPIO Settings" section, the internal flash is per default disabled. In order to activate the external LED, you need to activate `GPIO 12 state` and select `"extern flash light ws281x ..."`.
<img src="https://raw.githubusercontent.com/jomjol/ai-on-the-edge-device/master/images/external_GPIO_settings.jpg" width="700">
| Parameter | Meaning |
| -------------- | ------------------------------------------------------------ |
@@ -45,6 +28,4 @@ The handling of the WS2812 LED controller needs some other libraries, therefore
| Numbers of LED | Number of LEDs on the LED stripe |
| LED Color | The color and intensity can be controlled directly by a red/green/blue value, each within the range from 0 (off) to 255 (full) |
Enabling the GPIO settings automatically disables the flash LED. Therefore you can enable it here manually by checking GPIO4 and choose `"build-in led flash light"`. It is not recommended to use both illumination parallel.
Enabling the GPIO settings automatically disables the flash LED. Therefore you can enable it here manually by checking GPIO4 and choose `"build-in led flash light"`. It is not recommended to use both illumination parallel.