Skip to main content

Featured

Arduino Vesak Decorations

ARDUINO VESAK DECORATIONS Watch Full Video On YouTube >>> CIRCUIT DIAGRAM 01 CIRCUIT DIAGRAM 02 ✅DOWNLOAD FILES     📌 Circuit Diagram 01    ðŸ“Œ Circuit Diagram 02    ðŸ“Œ Code CODE #define delay50 500 int relays[] = {2, 3, 4, 5}; // Pins where relays are connected int num_of_relays; void setup() { num_of_relays = sizeof(relays) / sizeof(int); for (int i = 0; i < num_of_relays; i++) { pinMode(relays[i], OUTPUT); } } void loop() { delay(50); relayOn(); delay(50); relayOff(); delay(50); relayOn(); delay(50); relayOff(); delay(50); relayOn(); delay(50); relayOff(); delay(500); relayOn(); delay(50); relayOff(); delay(50); relayOn(); delay(50); relayOff(); delay(50); relayOn(); delay(50); relayOff(); delay(50); relayOn(); delay(50); relayOff(); delay(50); for (int i = 0; i < 5; i++) { patte...

IR Receiver With RGB LED

 IR RECEIVER WITH RGB LED😎

Watch Full Video On YouTube >>>


CIRCUIT DIAGRAM


CODE
  1. #include <IRremote.h>

  2. IRrecv chethana(10);
  3. decode_results results;

  4. void setup(){
  5. chethana.enableIRIn();
  6.   pinMode(13,OUTPUT);
  7.   pinMode(12,OUTPUT);
  8.   pinMode(11,OUTPUT);
  9. Serial.begin(9600);
  10. }

  11. void loop() {
  12.   if(chethana.decode(&results)){
  13.     Serial.println(results.value,DEC);
  14.     chethana.resume();
  15.   }

  16.   delay(100);

  17.   long val = results.value;

  18.   if(val == 16){ //RED
  19.     digitalWrite(13,HIGH);
  20.     digitalWrite(12,LOW);
  21.     digitalWrite(11,LOW);
  22.   }
  23.   if(val == 2064){ //GREEN
  24.     digitalWrite(13,LOW);
  25.     digitalWrite(12,HIGH);
  26.     digitalWrite(11,LOW);
  27.   }
  28.   if(val == 1040){ //BLUE
  29.     digitalWrite(13,LOW);
  30.     digitalWrite(12,LOW);
  31.     digitalWrite(11,HIGH);
  32.   }
  33.   if(val == 2704){ //OFF
  34.     digitalWrite(13,LOW);
  35.     digitalWrite(12,LOW);
  36.     digitalWrite(11,LOW);
  37.   }
  38. }
                                                                                    DOWNLOAD LIBRARY
                                                                                    Thanks For Visit My Blog..!

                                                                                    Comments

                                                                                    Popular Posts

                                                                                    Youtube Channel Image
                                                                                    Arduino Lk Subscribe To Watch More Arduino Tutorials
                                                                                    Subscribe