-->
Page 8 of 19

Re: RGB Controller for Apple HomeKit and Siri (NodeMCU-ESP82

PostPosted: Sat Sep 30, 2017 7:13 am
by eqsOne
My product list without links:

Homebridge
    Raspberry Pi (any will do, i.e. Zero W)
    Power Supply

LED Controller
    Breadboard (doublesided, about 3.5x10cm)
    NodeMCU (i.e. V2 Amica Board)
    2x Single-Row Pin Header Socket for NodeMCU
    Recom R-785.0-1.0, 5V 1A (or L7805)
    3x (TIP122 - outdated) IRLZ44N MOSFET
    3x resistor 500Ω
    some cable

Optional
    for Recom R78xx: 10µF (@input) & 100µF (@output)
    Button (I chose a touch button)
    single row Pin Header socket for NodeMCU
    Strapubox 6090 or similar

Unless you already have some
    RGB LED strip
    Power Supply 12V (Make sure it delivers appropriate amperage for the entire strip length at max brightness!)

Bild.jpeg

Re: RGB Controller for Apple HomeKit and Siri (NodeMCU-ESP82

PostPosted: Fri Nov 17, 2017 1:29 pm
by daniel_asilva
Hi. Thank you so much for this incredible tutorial. I noted you added that lines for 10-bit PWM as suggested by J6r06n, I was blowing my head to reshift the values from the number variable but a simple map function can solve this :lol:.
But like J6r06n, I also added one more thing to your code. Since I’m using a IRLZ44N MOSFET, when the arduino boots up, the pins are default to input, said to be in a high-impedance state, so the MOSFETS thinks it must turn on, and all colors of my LED strip brights up.
So I simple noted that you don’t have this lines in your void setup, then I added it before Serial.begin line:
Code: Select allpinMode(redPin, OUTPUT)
pinMode(grnPin, OUTPUT)
pinMode(bluPin, OUTPUT)

With this, after booting, all the color pins are defined as output, low-impedance, after that comes setHex() function, and everything works perfectly! :D

Re: RGB Controller for Apple HomeKit and Siri (NodeMCU-ESP82

PostPosted: Mon Nov 20, 2017 3:23 am
by eqsOne
Thanks daniel, you're welcome! Nice finding, just added this to the sketch.

Re: RGB Controller for Apple HomeKit and Siri (NodeMCU-ESP82

PostPosted: Thu Feb 01, 2018 10:55 am
by Alexey Lex
Good afternoon! tell me how to make a fade effect when turning on and off,
I tried it but when I change any color, it all starts with white