0% found this document useful (0 votes)
5 views

PBL Activity 6 (Arduino) .

Uploaded by

nilectrofirefox
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

PBL Activity 6 (Arduino) .

Uploaded by

nilectrofirefox
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

K J Somaiya College of Engineering

A Constituent College of Somaiya Vidyavihar University


Course: Introduction to Project Based Learning

Template for Arduino and LED Interfacing Activity

Statement Given:

Task I:

Interfacing of LEDs and pattern generation

Use Arduino and LED Board to perform following activities

● Different Patterns of LED on- off sequence and duration of on - off time

Task II:

Interfacing and controlling of LEDs using Push switch Button provided on LED board.

● Control LED on/off patterns with push button input.

Evaluation Criteria:

1. Connections as per task I (Only LED pattern -3 marks)


2. Working and Code for Arduino for the Task I - 4 marks
3. Connections as per task II (Push Button and LED -3 marks)
4. Working and Code for Arduino for the Task II - 5 marks
5. LMS submission of template and videos. - 10 marks

Team

Sr No Roll No Name Work Done

1 16010124026 Parth Gupta Clicked the photos, videos


and helped in coding

2 16010124027 Atharva Jaguste Cultivated some connections


and coding

3 16010124028 Sumit Jaiswar Facilitated interconnections


and joining’s

4 16010124029 Shayak Joydhar Implemented algorithms and


did coding

5 16010124030 Nihar Kachhy Established and forged the


connections
K J Somaiya College of Engineering
A Constituent College of Somaiya Vidyavihar University
Course: Introduction to Project Based Learning

Fill your details as per following points

● Circuit Diagram for the tasks.

● Respective codes:-

 1st code:
const int buttonPin = 2, Il the number of the pushbutton pin
const int ledPin = 13; I/the number of the LED pin
/l vanables will change:
mt buttonSlate = 0; /I variable for reading the pushbutton status
void setup t
I/ mitia ze the LED pin as an output
pinMode(ledPin, OUTPUT);
Il initialze the pushbutton pin as an input pimMode(buttonPin, INPUT),
void loop0 l
Il read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
I/ check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState = HIGH) (
I/ tum LED on:
digita/Write (ledPin, HIGH).
) else [
// tum LED off.
digita Write (ledPin, LOW),

 2nd code:
const int buttonPin = 2, // the number of the pushbutton pin const int ledPin = 13; //
the number of the LED pin
// variables will change: int buttonState = 0; // variable for reading the pushbutton
status
void setup() ( // initialize the LED pin as an output pinMode(ledPin, OUTPUT); //
initialize the pushbutton pin as an input pinMode(buttonPin, INPUT);
void loop() ( // read the state of the pushbutton value: buttonState =
digitalRead(buttonPin);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH: if (buttonState =
HIGH) ( // tum LED on:
digitalWrite(ledPin, HIGH); } else ( // turn LED off. digitalWrite(ledPin, LOW);
)
K J Somaiya College of Engineering
A Constituent College of Somaiya Vidyavihar University
Course: Introduction to Project Based Learning

● Photo and video of Actual implementation


K J Somaiya College of Engineering
A Constituent College of Somaiya Vidyavihar University
Course: Introduction to Project Based Learning
K J Somaiya College of Engineering
A Constituent College of Somaiya Vidyavihar University
Course: Introduction to Project Based Learning

● Observations , reflection on activity

Observations: Task 1-

 Successfully interfaced LEDs with the Arduino.


 Generated various LED patterns (e.g., blinking, alternate on-off, sequential
chase).
 Adjusted on/off durations using delay() for different effects.
K J Somaiya College of Engineering
A Constituent College of Somaiya Vidyavihar University
Course: Introduction to Project Based Learning

 Code implementation demonstrated control over multiple LEDs in a


synchronized manner.

Task 2-

 Interfaced the push-button switch to control LED behavior.


 Observed debounce issues initially, resolved using software debounce
techniques.
 Confirmed that the button effectively toggled or controlled LED patterns.

Reflections:

 Learned the importance of precise timing and logic to achieve desired LED patterns.
 Gained understanding of input handling with switches, including debouncing
techniques.
 Enhanced confidence in combining digital outputs (LEDs) with digital inputs (push
buttons).
 The activity bridged theoretical knowledge with practical implementation, reinforcing
programming and hardware skills.

You might also like