RGBW Example
-
Thanks for that example. Looks like domoticz also supports it. I will have to try that soon.
-
I hope you will like it, dimoticz not fully support S_RGB_LIGHT yet but this sketch use three dimmers and one on/off for start/stop rgb color cycle. Work just perfect. :-) thanks hek to share it.
-
Which sketch do you mean? The one hek posted? The one in the post you linked is only displaying the values it gets...
-
I was mean mine :D RGB-3D.ino.
howto, sry for french thread but screenshots are useful..
you can try gizmocuz test sketch like I done, but as you can read (link posted) it's not usable yet
ps: why posting in homeseer controler section, if you use domoticz ?
-
Guess I will have to see how good my french still is^^
Good question actually... I don't know why this is in the homeseer section. I defenitly intended it to bin the the domoticz section. Could someone move this?
Anyways, I got it to work with domoticz only partially. It shows up as an RGBW switch but you can only select RGB colors (where do you get the white part from?) and it seems like only on and off commands reach the sensor. No new color values.
I will keep trying though. -
V_RGBW seems to be working. I will post my code once one more problem is solved:
I do get a new hex string from the server on the arduino side... how do I break that up into 4x 0..255 values to control the pwm pins? I found some hints to use bit shifting, but I am unsure how to use that. Any ideas?Example:
void incomingMessage(const MyMessage &message) { // h = hex value // message = e.g. (h) #112233AB redval = ?; // h11 => 17 greenval = ?; // h22 => 34 blueval = ?; // h33 = 51 whiteval = ?; //AB = 171 analogWrite(RED_PIN, redval); analogWrite(GREEN_PIN, greenval); analogWrite(BLUE_PIN, blueval); analogWrite(WHITE_PIN, whiteval); } -
i just built an rgb led light last weekend, so i would like to see get the code working as rgb vs 3 dimmers.
i did a quick google i found this http://stackoverflow.com/questions/23576827/arduino-convert-a-sting-hex-ffffff-into-3-int which seems to be what your looking for with 3 values, i havent had a chance to test it or expand it to 4 values.
@LastSamurai anychance you would be willing to share what you have so far?
-
I surely would, but I sadly haven't had the time to do more testing. Perhaps this weekend. I posted my own question on stackoverflow and it seems like I have found a solution (although not tested by me yet).
Domoticz with V_RGBW worked though when I first tried it. With that part of the code you should be able to get it up and running. -
I surely would, but I sadly haven't had the time to do more testing. Perhaps this weekend. I posted my own question on stackoverflow and it seems like I have found a solution (although not tested by me yet).
Domoticz with V_RGBW worked though when I first tried it. With that part of the code you should be able to get it up and running.To convert a hex string to elementary colors, you have to do, something like that :
1- convert your string to unsigned 32 bit integer
unsigned long value = strtol( hexstring, NULL, 16);2- assuming your integer is coded : 0xrrggbbww
uint8_t redval = (value >> 24) & 0xFF ; uint8_t greenval = (value >> 16) & 0xFF ; uint8_t blueval = (value >> 8) & 0xFF ; uint8_t whiteval = value & 0xFF ; -
Thanks for the help. I got it to work. I posted a link to the code over here.