test pour la couleur
This commit is contained in:
parent
09edbe02f6
commit
c2fe8b118f
@ -116,7 +116,12 @@ void callbackMQTT(char* topic, byte* payload, unsigned int length)
|
||||
FastLED.setBrightness(brightness);
|
||||
client.publish(MQTT_LED_BRIGHTNESS_STATE, message_buff, true);
|
||||
} else if (stopic == MQTT_LED_COLOR_COMMAND) {
|
||||
color = msgString.toInt();
|
||||
// Sample : 134,168,255
|
||||
color = CRGB(
|
||||
msgString.substring(0,3).toInt(),
|
||||
msgString.substring(4,7).toInt(),
|
||||
msgString.substring(8,11).toInt()
|
||||
);
|
||||
client.publish(MQTT_LED_COLOR_STATE, message_buff, true);
|
||||
} else if (stopic == MQTT_LED_SPEED_COMMAND) {
|
||||
speed = msgString.toInt();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user