![]() Void randomFade() //function called by the timer to repeat every x milliseconds n() //Continuously run the timerįadeButtonState = param.asInt() //Stores the state of button each time V0 is pressed Adjust as necessary to see faster or slower fade. tInterval(15,randomFade) //Set time interval to run the randomFade function every x milliseconds. Int greenBrightness = 0 // Variables to set starting brightness and speed of fading for LED strip ![]() Int lastFadeButtonState = 0 //Variable to store the prior state of button attached to V0 Int fadeButtonState //Variable to store the state of button attached to V0 Int bluePin = 2 //Create variable for esp8266 gpio2 pin Int greenPin = 0 //Create variable for esp8266 gpio0 pin Int redPin = 1 //Create variable for esp8266 TX pin (gpio1) * Comment this out to disable prints and save space */ ![]() Add 2 Button Widgets and 3 Slider Widgets. Attach gpio0 pin of esp to blue led ground lead transistors' base through appropriate resistorĨ. Attach gpio2 pin of esp to green led ground lead transistors' base through appropriate resistorĦ. Attach TX pin of esp to red led ground lead transistors' base through appropriate resistorĥ. Connect each colors' ground lead through individual NPN transistors to groundĤ. Connect LED power lead to 12v power supply and connect both power supply groundsģ. In this example we'll use ESP8266-01, 3.3v power supply, 12v RGB LED strip, 12v power supply, npn transistors, and resistors of appropriate valuesĢ. Let’s control your RGB LED strip light with Blynk! Servo example, or choose a USB sketch and add a code from SendData Think of them as LEGO bricks and combine them as you wish.įor example, take the Ethernet Shield sketch and combine it with the There is a bunch of great example sketches included to show you how to get Arduino UNO or similar microcontroller board Blynk App (download from AppStore or Google Play) ![]() And it works with almost everyīlynk library is licensed under MIT license I’ve used this behind my TV and now will be using it in my shower as some cool custom mood lighting. Great for any application that uses RGB strip lights. A super useful project for LED strip lights. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |