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

1) To Configure Digital Input and Output Pin of The Arduino Board. 2) To Create Program That Allows The User To Input Binary Value

This document provides instructions for a workshop on configuring digital input and output pins on an Arduino board. The objective is to create a program that allows a user to input a binary value using a pushbutton switch connected to a breadboard with an Arduino, resistor, and LED. The document includes questions about the circuit configuration and code to read the input pin state. It prompts reconfiguring the circuit to use different input and output devices, and modifying the code to control a tricolor LED.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

1) To Configure Digital Input and Output Pin of The Arduino Board. 2) To Create Program That Allows The User To Input Binary Value

This document provides instructions for a workshop on configuring digital input and output pins on an Arduino board. The objective is to create a program that allows a user to input a binary value using a pushbutton switch connected to a breadboard with an Arduino, resistor, and LED. The document includes questions about the circuit configuration and code to read the input pin state. It prompts reconfiguring the circuit to use different input and output devices, and modifying the code to control a tricolor LED.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

BTC 319 – Microprocessors and Peripherals

Digital Input 1

Objective

1) To configure digital input and output pin of the Arduino board.


2) To create program that allows the user to input binary value.

Materials

1 – Breadboard
1 – Arduino Uno Board
1– 22 Ω
1– 10 KΩ
1 – Light Emitting Diode (LED) Red
1 – tactile switch

Configuration (Actual Circuit Diagram)

1|Page
BTC 319 – Microprocessors and Peripherals

Code

1) What is the initial state of a pushbutton based in the configuration?

Based on the configuration, The initial state of a pushbutton is LOW or 0


which means the bulb is off.

2) What is the state of the pushbutton when pressed?

Based on the configuration, The state of the pushbutton when pressed is


HIGH or 1 which means the bulb is on.

3) Think of an application wherein this workshop can be applied in the field of


(Justify your answer):

a) Education – In ringing the alarm for breaktime in school.

b) Industrial – In ringing the emergency button in industries.

c) Home application – In using the remote control for changing the channels in
television.

2|Page
BTC 319 – Microprocessors and Peripherals

4) What is the purpose of digitalRead() function in this workshop?

The purpose of digitalRead() in this workshop is to read the logic state at a


pin whether the voltage at this pin is high (~ 5V) or low (~ 0V) or at logic state 1
(HIGH) or 0 (LOW).

5) Think of another electronic component as input device aside from the


pushbutton in this workshop with the same intended output. Based on this
selected electronic component reconfigure the circuit and code of Workshop
6) Place your configuration and code in the succeeding page or you may
use a separate sheet indicating your new configuration and code.

3|Page
BTC 319 – Microprocessors and Peripherals

7) Think of another electronic component as output device aside from the


pushbutton in this workshop with the same intended output. Based on this
selected electronic component reconfigure the circuit and code of Workshop.
8) Place your configuration and code in the succeeding page or you may use a
separate sheet indicating your new configuration and code.

4|Page
BTC 319 – Microprocessors and Peripherals

5|Page
BTC 319 – Microprocessors and Peripherals

9) Redo Workshop 4, make use of a tricolor LED as output indicator which


changes the LED display color when the user presses the pushbutton
switch. Place your configuration and code in the succeeding page or you
may use a separate sheet indicating your new configuration and code.

6|Page
BTC 319 – Microprocessors and Peripherals

7|Page
BTC 319 – Microprocessors and Peripherals

8|Page

You might also like