A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By trackerj
#65379 Another cheaper than RECOM alternative to 78xx
with 5V or even 3.3V output for direct ESP8266 power
can be found here: Synchronous step down DC-DC converter

Image

Image
User avatar
By eqsOne
#65389 Thanks trackerj, looks like a solid alternative.

One more addition, a small change to the 'getV()' section was necessary as well to make homekit read and show the new 10bit resolution correctly:

Code: Select allvoid getV() {
  R = roundf(r/10.23); //was (r/2.55);
  G = roundf(g/10.23); //was (g/2.55);
  B = roundf(b/10.23); //was (b/2.55);
  x = max(R,G);
  V = max(x, B);
}


Seems to work synchronised again this way.

EDIT: Oops, typo in 'G' and 'B' corrected.
User avatar
By Telefisch
#65803 Hello...
thanks for this project, I got it working with RGB but I have two additional channels, that I'd like to use for two white-strips.

As I understood, the readString-variable contains the "command" or "request" from Homebridge and the additional value.
I'm trying to seperate the brightness-value, if I get the following homebridge-command:
Code: Select all"brightness": {
            "status": "http://localhost/api/v1/brightness_s1",
            "url": "http://localhost/api/v1/brightness_s1/%s"
        }


I modified it to brightness_s1 for switch 1 so I know which switch is controlled.
So far so good,
Til now I'm able to set the white strip on/off and give it a fixed brightness-value, that I also can read as value in Home-App.
But how can I seperate the brightness-value from the requesting string?
Code: Select all          //Set brightness White 1
          if(readString.indexOf("brightness_s1") >0) {
            brightW1 = readString.substring(9).toInt();  //This doesn't work
            //brightW1=25;  //this worked fine
            setW1();
          }


I'm not so familar with arduino yet, so I will need some help, please.

...why is it substring(9,15) in Set color section?
User avatar
By eqsOne
#65821 Hi, yes I also had in mind taking it to control an rgbw someday. At this point I can't provide you any good hints on this, since my 3-channel strip was already installed I just played with the rgb possibilitys in this setup. Maybe someone who already did this might join in?!

'substring(9,15)' looks for the characters from position 9 through 15 of the whole incoming string. It gets the 6-digit hex-color value at that position. 'getV()' then just calculates the brightness value (0-100) from that hex number.

Without the two parameters in brackets you can have a look at the whole string, too. Just print it to the serial output.

Here's a quite good explanation of the substring() function.