cmmakerclub / led_mqtt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

led_mqtt

This project use MQTT-Connector and adafruit neopixel.

Setup

Set DEVICE_NAME, WIFI_SSID, WIFI_PASSWORD And MQTT SERVER.

MQTT API

Topic $/set_mode

eg. WORKSHOP/LED_STRIP_002/$/set_mode

Payload

idle
run
rainbow
rainbow2
rainbow3

Example

run

idle

Do nothing.

run

led running

rainbow

show rainbow for shot of time

rainbow2

show rainbow for shot of time	

rainbow3

show rainbow for shot of time	

Topic $/set_led_all

Set color for all led in strip.

eg. WORKSHOP/LED_STRIP_002/$/set_led_all

Payload

FFAA33

FF = Red
AA = Green
33 = Blue

Example

FF00AA

Topic $/set_led

eg. WORKSHOP/LED_STRIP_002/$/set_led

Set color for specific led.

Payload

00FFAA33

xx = led number
FF = Red
AA = Green
33 = Blue

Example

01FF00AA
-> set led number 1 with color FF00AA

02FF00AA,03FA00AF,041F00AA
-> set led number 2 with color FF00AA
-> set led number 3 with color FA00AF
-> set led number 4 with color 1F00AA

Topic $/set_run_length

eg. WORKSHOP/LED_STRIP_002/$/set_run_length

In run mode set length of trail. (1 - max led length)

Example

40

Topic $/set_run_led_main

eg. WORKSHOP/LED_STRIP_002/$/set_run_led_main

In run mode set running main led color.

Example

FF00AA
-> set color for main running led

Topic $/set_run_led_trail

eg. WORKSHOP/LED_STRIP_002/$/set_run_led_trail

In run mode set running led trail color.

Example

FF00AA
-> set color for main running led

Topic $/set_run_delay

eg. WORKSHOP/LED_STRIP_002/$/set_run_delay

In run mode set delay for running. (0 - 10000)

Example

30

About


Languages

Language:C++ 55.0%Language:C 45.0%