Header Ads

Header ADS

How to Make A RGB LED Strip Light Controller using Arduino

 How to Make A RGB LED Strip Light Controller using Arduino



📌JLCPCB $2 for 5 pcs 2layer pcb prototype/ 4 layer pcb prototype : https://jlcpcb.com How to Make A RGB LED Strip Light Controller using Arduino in Bangla | JLCPCB Visit My Programming Tutorial Channel: https://youtube.com/channel/UCeVGeehSnnf-X_FpAsIF3OQ Major topics covered in this video: ------------------------------------------------------ How do I control RGB LED strips with Arduino? How do you make RGB strips? How many RGB LEDs can an Arduino control? Can I use RGB LED Strip without the controller?




Program Code:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include <SoftwareSerial.h> SoftwareSerial BLU(0,1); #define redPin 6 #define greenPin 3 #define bluePin 5 void setup() { //Serial setup Serial.begin(9600); Serial.println("-= HC-05 Bluetooth RGB LED =-"); BLU.begin(9600); BLU.println("-= HC-05 Bluetooth RGB LED =-"); pinMode(4, OUTPUT); digitalWrite(4,HIGH); pinMode(redPin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); setColor(255, 0, 0); delay(500); setColor(0, 255, 0); delay(500); setColor(0, 0, 255); delay(500); setColor(255, 255, 255); } void loop() { while (BLU.available() > 0) { int redInt = BLU.parseInt(); int greenInt = BLU.parseInt(); int blueInt = BLU.parseInt(); redInt = constrain(redInt, 0, 255); greenInt = constrain(greenInt, 0, 255); blueInt = constrain(blueInt, 0, 255); if (BLU.available() > 0) { setColor(redInt, greenInt, blueInt); Serial.print("Red: "); Serial.print(redInt); Serial.print(" Green: "); Serial.print(greenInt); Serial.print(" Blue: "); Serial.print(blueInt); Serial.println(); BLU.flush(); } } } void setColor(int red, int green, int blue) { analogWrite(redPin, red); analogWrite(greenPin, green); analogWrite(bluePin, blue); }

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Please subscribe to my channel. Subscription link here:
https://goo.gl/JDjNeq
All Documents Download Link: https://drive.google.com/drive/folders/1znhORU69oAL1jmnRtnVFKBXxo9uijdo8?usp=sharing All social link Facebook: https://bit.ly/2SAbptO Instagram: https://bit.ly/2MWRobw Estiak Khan Jhuman Facebook Link: https://bit.ly/2MVL1oM Youtube Link: https://bit.ly/2US5spz

No comments

Theme images by Bim. Powered by Blogger.