Hello all,
I'm working an a led ribbon system that will communicate with my home automation system (Jeedom via generic HTTP).
The home automation system can easily populate colors code (RGB) in hexa, e.g. #FFFFFF. I want the espeasy to read the code directly.
Is there a formula (not listed here : https://www.letscontrolit.com/wiki/inde ... asyFormula) that can convert Hex --> decimal ?
Is there a function to slide the code in 3 parts to work on the channel (RGB) independently ?
Any help is appreciated.
Thanks
convert hexa to pwm values
Moderators: grovkillen, Stuntteam, TD-er
Re: convert hexa to pwm values
i try something ... but as the result i send the decimal value for every color ... because ESPEasy don#t receive strings via MQTT.
so for FFFF00 i send 255 255 0
On MQTTRGB#LEDBlue do
NeoPixel,1,[MQTTRGB#LEDRed],[MQTTRGB#LEDBlue],[MQTTRGB#LEDGreen]
endon
so for FFFF00 i send 255 255 0
On MQTTRGB#LEDBlue do
NeoPixel,1,[MQTTRGB#LEDRed],[MQTTRGB#LEDBlue],[MQTTRGB#LEDGreen]
endon
Who is online
Users browsing this forum: No registered users and 14 guests