From 443a971f560b3c524342443540467014e3bd000a Mon Sep 17 00:00:00 2001 From: Kamali22004796 <120567837+Kamali22004796@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:40:43 +0530 Subject: [PATCH] Update README.md --- README.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d02f05..08cc348 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Led-control-using-Arduino - +# Date:22.08.2024 ## AIM To design and implement a system for LED control using an Arduino microcontroller and a push button. @@ -59,8 +59,46 @@ Weighing Machines
## CIRCUIT DIAGRAM +![image](https://github.com/user-attachments/assets/5e81bbdf-e7c2-4da5-9c0c-d8c6871befee) + + ## PROGRAM +Developed by: kamali e +register no: 212222110015 + +``` +const int buttonPin = 3; +const int ledPin = 13; +int buttonState = 0; +void setup() { + pinMode(ledPin, OUTPUT); + pinMode(buttonPin, INPUT); +} +void loop() +{ + buttonState = digitalRead(buttonPin); + if (buttonState == HIGH) +{ + digitalWrite(ledPin, HIGH); +} + else +{ + digitalWrite(ledPin, LOW); +} +} +``` ## OUTPUT +Off + +![image](https://github.com/user-attachments/assets/2dd000e3-4c8f-457b-a6cd-cf30735fc7a2) + +On + +![image](https://github.com/user-attachments/assets/864fdbcc-ef94-4f4f-89b7-2b32759c6f0e) + + ## RESULT + +Thus an LED control system using arduino microcontroller and push button is executed.