diff --git a/README.md b/README.md index 3581c17..1cbde0c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Control-of-Relay-Using-IoT-controller - +``` +Name: Ratheesh Kumar B R +Reg no: 212223110040 +``` ## AIM: To control the Relay using Arduino controller @@ -38,10 +41,26 @@ When there is no voltage applied to the coil, COM (common) is connected to NC (n In this Arduino Relay Control Circuit we have used Arduino to control the relay via a BC547 transistor. We have connected transistor base to Arduino pin A0 through a 1k resistor. An AC bulb is used for demonstration.Working is simple, we need to make the RELAY Pin (PIN A0) high to make the Relay module ON and make the RELAY pin low to turn off the Relay Module. The AC light will also turn on and off according to Relay. ## PROGRAM: - +``` +const int relay = A0; +void setup() { + pinMode(relay, OUTPUT); +} +void loop() { + digitalWrite(relay,HIGH); + delay(1000); + digitalWrite(relay,LOW); + delay(1000); +} +``` ## CIRCUIT DIAGRAM: +![Screenshot 2024-09-11 090505](https://github.com/user-attachments/assets/53d37896-501b-4e1c-9f9c-f05ee3e5348a) + ## OUTPUT: +![Screenshot 2024-09-11 085620](https://github.com/user-attachments/assets/f7024de7-9d1f-41a8-85dd-ccc6d397ef8e) +![Screenshot 2024-09-11 085639](https://github.com/user-attachments/assets/95759e50-1df9-45ba-aa11-714ba895ed68) + ## RESULT: