-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added configuration parameters get/set via serial connection - enabled API commands input via serial connection - unified `color-light` firmware by adding configurable parameters - added `#VERSION` command to retrieve firmware version info
- Loading branch information
Showing
16 changed files
with
258 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
cmake-build-debug | ||
CMakeFiles | ||
.idea | ||
artifacts | ||
|
||
# Clion | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# color-light | ||
|
||
A smart light device with addressable RGB LEDs. | ||
|
||
- [Documentation and firmware install page](https://homegenie.it/mini/1.2/examples/smart-led-lights/) | ||
|
||
|
||
## Firmware configuration | ||
|
||
| Key | Description | Default | | ||
|------------|----------------------------|-----------------------------------------| | ||
| `leds-pin` | LEDs strip GPIO pin number | -1 (-1=not used) | | ||
| `leds-cnt` | Number of LEDs | 1 (1 - 200) | | ||
| `stld-typ` | LEDs type | RGB/RGBW order mask (see code for ref.) | | ||
| `leds-spd` | Data transfer speed | 0 (0=800KHz, 256=400KHz) | | ||
| `stld-pin` | Status LED (RGB) pin | -1 (-1=not used) | | ||
| `stld-typ` | Status LED type | RGB/RGBW order mask (see code for ref.) | | ||
| `stld-spd` | Status LED speed | 0 (0=800MHz, 256=400MHz) | | ||
|
||
*Example **setting** configuration from a terminal connected to the serial port of the device:* | ||
|
||
``` | ||
#SET:leds-pin=5 | ||
#SET:leds-cnt=25 | ||
#SET:leds-typ=6 | ||
#SET:leds-spd=0 | ||
#SET:stld-pin=10 | ||
#SET:stld-typ=82 | ||
#SET:stld-spd=0 | ||
#RESET | ||
``` | ||
|
||
*Example **getting** configuration value:* | ||
|
||
``` | ||
#GET:stl-pin | ||
``` | ||
response: | ||
``` | ||
#GET:stl-pin=10 | ||
``` | ||
|
||
## Manual build and install | ||
|
||
You can manually build and install the firmware from source code | ||
as explained in the [Getting started](../../getting-started#custom-firmware) page | ||
and using the following command for flashing the firmware: | ||
|
||
```bash | ||
pio run -e color-light[<target>] -t upload | ||
``` | ||
|
||
where the optional `<target>` suffix can be one of the following: `-c3`, `-d1-mini`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
#ifndef CONFIG_StatusLedNeoPixelPin | ||
#define CONFIG_StatusLedNeoPixelPin 10 | ||
#endif | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,16 @@ data_dir = ./data/web | |
|
||
[env] | ||
build_src_filter = -<*> +<src/*> | ||
build_flags = -D CRON_USE_LOCAL_TIME -DCRON_DISABLE_YEARS -Os | ||
build_flags = -D CRON_USE_LOCAL_TIME -D CRON_DISABLE_YEARS -Os -D BUILD_ENV_NAME=\"$PIOENV\" | ||
build_unflags = -fno-exceptions | ||
framework = arduino | ||
board = esp32dev | ||
board_build.filesystem = littlefs | ||
board_build.flash_size = 4MB | ||
board_build.partitions = ./src/partitions.csv | ||
monitor_filters = send_on_enter | ||
monitor_eol = LF | ||
monitor_echo = true | ||
lib_deps = | ||
[email protected] | ||
thijse/[email protected] | ||
|
@@ -32,6 +35,8 @@ lib_deps = | |
lovyan03/[email protected] | ||
dvarrel/[email protected] | ||
jpb10/[email protected] | ||
lib_deps_8266 = | ||
vshymanskyy/[email protected] | ||
|
||
|
||
[env:default] | ||
|
@@ -43,6 +48,8 @@ build_flags = ${env.build_flags} | |
platform = [email protected] | ||
board = d1_mini | ||
build_flags = ${env.build_flags} -D DISABLE_UI -D DISABLE_AUTOMATION | ||
lib_deps = ${env.lib_deps_8266} | ||
${env.lib_deps} | ||
lib_ignore = | ||
ESP32Time | ||
ESP32_BleSerial | ||
|
@@ -84,7 +91,8 @@ platform = [email protected] | |
board = d1_mini | ||
build_flags = ${env.build_flags} -I examples -I src -D DISABLE_UI -D DISABLE_AUTOMATION | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/smart-sensor> | ||
lib_deps = ${env.lib_deps} | ||
lib_deps = ${env.lib_deps_8266} | ||
${env.lib_deps} | ||
[email protected] | ||
lib_ignore = | ||
ESP32Time | ||
|
@@ -133,6 +141,8 @@ platform = [email protected] | |
board = d1_mini | ||
build_flags = ${env.build_flags} -D DISABLE_UI | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/x10-transceiver> | ||
lib_deps = ${env.lib_deps_8266} | ||
${env.lib_deps} | ||
lib_ignore = | ||
ESP32Time | ||
ESP32_BleSerial | ||
|
@@ -150,7 +160,8 @@ platform = [email protected] | |
board = d1_mini | ||
build_flags = ${env.build_flags} -D DISABLE_UI | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/rf-transceiver> | ||
lib_deps = ${env.lib_deps} | ||
lib_deps = ${env.lib_deps_8266} | ||
${env.lib_deps} | ||
[email protected] | ||
lib_ignore = | ||
ESP32Time | ||
|
@@ -178,6 +189,19 @@ lib_deps = ${env.lib_deps} | |
lib_ignore = | ||
LovyanGFX | ||
|
||
[env:ir-transceiver-d1-mini] | ||
platform = [email protected] | ||
board = d1_mini | ||
build_flags = ${env.build_flags} -D DISABLE_UI | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/ir-transceiver> | ||
lib_deps = ${env.lib_deps_8266} | ||
${env.lib_deps} | ||
crankyoldgit/[email protected] | ||
lib_ignore = | ||
ESP32Time | ||
ESP32_BleSerial | ||
LovyanGFX | ||
|
||
[env:ir-transceiver-c3] | ||
platform = [email protected] | ||
board = esp32-c3-devkitc-02 | ||
|
@@ -207,33 +231,6 @@ build_src_filter = +<src> -<src/main.cpp> +<lib/jerryscript/amalgam/*> +<example | |
lib_deps = ${env.lib_deps} | ||
https://github.com/adafruit/Adafruit_NeoPixel#1.12.0 | ||
|
||
[env:color-light-c3-25] | ||
platform = [email protected] | ||
board = esp32-c3-devkitc-02 | ||
#board = esp32-c3-devkitm-1 | ||
build_flags = ${env.build_flags} -I examples -I src -D ESP32_C3 -D DISABLE_UI -D CONFIG_StatusLedPin=-1 -D LED_ARRAY_COUNT=25 -D LED_ARRAY_PIN=8 -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=1 | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/color-light> | ||
lib_deps = ${env.lib_deps} | ||
https://github.com/adafruit/Adafruit_NeoPixel#1.12.0 | ||
|
||
[env:color-light-c3-64] | ||
platform = [email protected] | ||
board = esp32-c3-devkitc-02 | ||
#board = esp32-c3-devkitm-1 | ||
build_flags = ${env.build_flags} -I examples -I src -D ESP32_C3 -D DISABLE_UI -D CONFIG_StatusLedPin=-1 -D LED_ARRAY_COUNT=64 -D LED_ARRAY_PIN=5 -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=1 | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/color-light> | ||
lib_deps = ${env.lib_deps} | ||
https://github.com/adafruit/Adafruit_NeoPixel#1.12.0 | ||
|
||
[env:color-light-c3-90] | ||
platform = [email protected] | ||
board = esp32-c3-devkitc-02 | ||
#board = esp32-c3-devkitm-1 | ||
build_flags = ${env.build_flags} -I examples -I src -D ESP32_C3 -D DISABLE_UI -D CONFIG_StatusLedPin=-1 -D LED_ARRAY_COUNT=90 -D LED_ARRAY_PIN=5 -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=1 | ||
build_src_filter = +<src> -<src/main.cpp> +<examples/color-light> | ||
lib_deps = ${env.lib_deps} | ||
https://github.com/adafruit/Adafruit_NeoPixel#1.12.0 | ||
|
||
|
||
[env:shutter] | ||
platform = [email protected] | ||
|
Oops, something went wrong.