0% found this document useful (0 votes)
38 views5 pages

Seven Segment Display

The document discusses seven segment displays, their components and working. It also discusses switches, asynchronous and synchronous serial communication, keypad matrix and libraries, timer interrupts for time measurement and delay function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views5 pages

Seven Segment Display

The document discusses seven segment displays, their components and working. It also discusses switches, asynchronous and synchronous serial communication, keypad matrix and libraries, timer interrupts for time measurement and delay function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SEVEN SEGMENT DISPLAY

• A seven-segment display (SSD), or seven-segment


indicator, is a form of electronic display device for
displaying decimal numerals.

• SSD consists of seven LEDs arranged in rectangular


fashion.
• Each of the seven LEDs is called a segment.
• Each segment is labelled from “a” to “g” and
decimal point by “dp”.

• As seven-segment display provides a convenient


way to display decimal number in digital form, it is
helpful in general purpose devices and reduces the
complexity of data delivered.
By forward biasing, the LED glow and desired character
pattern or number is displayed. • It is used in many devices of our day to day life, like
in traffic signals, watches, cd/dvd player etc.
Types of SSD SWITCHES
• Common Anode (CA)
• An electrical component that can disconnect or
• Common Cathode (CC) connect the conducting path in an electrical circuit,
interrupting the electric current or diverting it from
• If the device is common Anode, there will be an one conductor to another.
anode PIN which must be pulled to VCC (5V), and
then any segment to be turned on must be pulled
"low".
WEAK 7
• If the device is common Cathode, there will be an
cathode PIN which must be grounded, and then any • Serial Communication
segment to be turned on must be pulled "high". • Asynchronous
• Synchronous

Serial communication in Arduino is a method of sending and


receiving data between the Arduino board and other
devices. Arduino supports both asynchronous (UART) and
synchronous (SPI, I2C) serial communication protocols,
offering flexibility for various applications.

• Universal Asynchronous Receiver-Transmitter


(UART)
• Serial Peripheral Interface (SPI) • KeyState getState() - Returns the current state of
any of the keys.
• Inter-Integrated Circuit(I2C)
The four states are IDLE, PRESSED, RELEASED and
HOLD.
Synchronous Communication:
• boolean keyStateChanged() - New in version 2.0:
- Synchronous Communication is quicker than Let's you know when the key has changed from one
Asynchronous since both the sender and receiver state to another. For example, instead of just
utilize the same time. testing for a valid key you can test for when a key
was pressed.
- Synchronous communication, there is a wire
• setHoldTime(unsigned int time) - Set the amount
between two communicating agents carrying the
of milliseconds the user will have to hold a button
clock pulse so both microcontrollers can
until the HOLD state is triggered.
communicate using the same pulse.
• setDebounceTime(unsigned int time) - Set the
Asynchronous Communication:
amount of milliseconds the keypad will wait until it
- Asynchronous Communication is slower than accepts a new keypress/keyEvent. This is the "time
Synchronous because each character needs its start delay" debounce method.
bit and stop bit.
• addEventListener(keypadEvent) - Trigger an event
- The Arduino IDE provides a built-in Serial library to if the keypad is used. You can load an example in
facilitate UART communication. the Arduino IDE.

WEAK 8

Keypad Matrix

- A matrix keypad is the kind of keypad you see on


microwave ovens, gas pumps, and calculators. A
matrix keypad you can connect to a breadboard is
also great for prototypes and inventions where WEAK 9
things like codes, times, or other values have to be
entered. PERIODIC INTERRUPTS AND TIME MEASUREMENT

- A keypad is a set of buttons arranged in a block or


“pad” which bear digits, symbols or alphabetical
letters. Pads mostly containing numbers are called
a numeric keypad. 1. Timer Interrupts: In Arduino, periodic interrupts are
Keypad Library often implemented using hardware timers available
on the microcontroller. These timers can be
- Keypad is a library for using matrix style keypads configured to generate interrupts at regular
with the Arduino. intervals. Arduino provides functions to set up and
handle these interrupts conveniently.
- It allows your Arduino to read a matrix type
keypad 2. Interrupt Service Routine (ISR): When a timer
interrupt occurs, the microcontroller jumps to a
- It was created to promote Hardware
specific function known as the Interrupt Service
Abstraction. It improves readability of the code
Routine (ISR). This routine typically performs the
by hiding the pinMode and digitalRead calls for
the user. desired action, such as updating a timer, reading a
sensor, or triggering an event.
Keypad Libraryi Functions
3. Timer Configuration: The Arduino programming
• void begin(makeKeymap(userKeymap)) - Initializes environment provides functions to configure timers
the internal keymap to be equal to userKeymap for generating interrupts at specific intervals. These
functions allow users to set the timer's prescaler,
• char waitForKey() - This function will wait forever compare match value, and other parameters to
until someone presses a key. Warning: It blocks all control the interrupt frequency.
other code until a key is pressed. That means no
blinking LED's, no LCD screen updates, no nothing 4. Handling Timer Overflow: For longer intervals, the
with the exception of interrupt routines. timer may overflow before reaching the desired
interval. Arduino handles this by resetting the timer
• char getKey() - Returns the key that is pressed, if and maintaining a counter to keep track of the
any. This function is non-blocking. number of overflows.
changes when they interact with the sensor.
Gas leakage detection, monitoring air
Delay() Function quality, ensuring industrial safety, home security
setups, and kitchen safety equipment.
- delay() function pauses the program for a specified time.

• Blocking Function: Program halts execution during 2. Infrared (IR) Sensor - Utilizes infrared
delay. illumination to identify objects, gauge distances, or
monitor line positions, comprising an IR LED and a
• Can't perform other tasks during the delay period. photodiode. Remote control devices,
robots that follow lines, proximity detectors,
• Not suitable for multitasking or time-sensitive obstacle avoidance systems, and speed measurement
applications. tools.

3. Sound Sensor - Identifies sound intensity


1. Millis() Function: Arduino provides a function called
using a microphone and transforms the acoustic
millis() that returns the number of milliseconds signal into an electrical one.
elapsed since the Arduino board began running the Monitoring sound levels, voice
current program. This function relies on an internal identification systems, security setups, interactive
timer interrupt and an overflow counter to track playthings, and environmental noise supervision.
time.
4. PIR Motion Sensor - Identifies motion by
2. Micros() Function: Similar to millis(), Arduino also sensing infrared radiation emitted by moving
offers a micros() function that returns the number entities, often humans or animals.
of microseconds elapsed since the Arduino board Security setups, automatic illumination,
started running the current program. This function intelligent home control, cameras activated by
provides more precise timing but with a shorter motion, and intrusion detection systems.
range due to the limited precision of the internal
timer. 5. Temperature Sensor (DHT11) - Gauges
temperature and humidity using a thermistor and a
3. Using Timers: For more precise timing or to create capacitive humidity sensor, offering digital output
custom timing intervals, Arduino users can directly signals. Weather observation setups,
manipulate hardware timers. This involves intelligent temperature controllers, greenhouse
configuring timers and handling interrupts to supervision, heating, ventilation, and air
achieve the desired timing behavior. conditioning (HVAC) systems, and industrial
environmental oversight.
RETURNS THE NUMBER OF
MILLISECONDS SINCE THE 6. Ultrasonic Sensor (HC-SR04) - Calculates
ARDUINO BOARD BEGAN RUNNING. distance by emitting ultrasonic waves and gauging
MILLIS the time it takes for the echo to rebound.
Object identification, obstacle evasion in
RETURNS THE NUMBER OF robots, gauging distances, liquid level assessment,
MICROSECONDS SINCE THE and aiding in parking maneuvers.
ARDUINO BOARD BEGIN RUNNING,
7.
MICROS
MILLIS WILL OVERFLOW (GO BACK
TO ZERO) AFTER APPROXIMATELY
______ DAYS? 50
MICROS WILL OVERFLOW (GO BACK
TO ZERO) AFTER APPROXIMATELY
______ MINUTES? 70 Flame Sensor - Identifies the existence of a flame
through the recognition of particular wavelengths of
Sensors and actuators infrared light emitted by fire. Fire
detection systems, flame recognition in industrial
SENSORS AND FUNCTIONS machinery, safety mechanisms in kitchens, and
WIRINGS APPLICATION systems for preventing gas leaks and fires.

Ex. Soil Moisture Sensor - to measure the water 8. Proximity Sensor - Identifies the presence
content in the soil Auto Watering, or absence of nearby objects without direct contact,
Smart Green House utilizing electromagnetic fields, light, or sound.
Industrial automation,
smartphones (for screen activation/deactivation
1. Gas Sensor (MQ-2) - Identifies different
gases like LPG, CO, and smoke through resistance
during calls), automotive parking assistance sensors, 6. Relay Module - A switch activated by
safety mechanisms, and hands-free interfaces. electricity, employed to regulate a high-power
circuit with a low-power signal, facilitating
9. Hall Effect Sensor - Operates by detecting separation between various components of a system.
magnetic fields using the Hall effect, which Domestic automation, industrial
produces a voltage perpendicular to an electric management, automotive setups, heating,
current when a conductor is subjected to a magnetic ventilation, and air conditioning (HVAC) systems,
field. Position detection, velocity and safety mechanisms.
measurement in rotating components, current
assessment, control of brushless DC motors, and 7. Servo Motor - Delivers precise control of
identification of magnetic fields. angular or linear position, speed, and acceleration
using a feedback sensor. Robotics, RC
10. Light Sensor (LDR) - Identifies the vehicles, robotic manipulators, automated
intensity of light by employing a photoresistor that production systems, and camera stabilizers.
adjusts its resistance according to changes in light
levels. Automatic lighting control, street 8. Solenoid Valve - Regulates the passage of
light management, display brightness regulation, liquids or gases by either opening or closing a valve
security alarms, and energy-efficient solutions. through the action of an electromagnetic solenoid.
Fluid management systems,
ACTUATORS AND FUNCTIONS watering systems, hydraulic setups, air-powered
WIRINGS APPLICATION systems, and water treatment systems.

Ex. DC MOTOR - to convert electrical energy 9. Stepper Motor - Operates in distinct steps,
into mechanical energy with the ability to control enabling accurate control of rotation angle, speed,
speed, direction, and torque Smart and position. It uses multiple coils that are energized
Green House, Smart House in a specific sequence. CNC
machinery, 3D printers, robotics, precise control
1. Cooling Fan - Offers cooling by circulating scenarios, and automated stage lighting.
air across a space, dispersing heat from various
components and systems. Cooling of 10. Heater - Generates warmth by transforming
electronics, heating, ventilation, and air conditioning electrical energy into heat energy through resistive
(HVAC) setups, computers, automotive cooling elements.
mechanisms, and server enclosures.
Heating setups, breeding
2. Vibration Motor - Generates tactile chambers, humidity regulators, industrial drying
feedback via vibrations, achieved by an unbalanced operations, and household appliances such as hair
weight connected to the motor shaft. dryers.
Mobile gadgets, gaming controllers, haptic
response setups, wearable technology, and medical
alarm systems. ARDUINO CODE

3. LED Display - Exhibits visual data through WHAT COMMAND IS USE TO READ THE
arrays or segments of light-emitting diodes. VALUE FROM A SPECIFIED DIGITAL
Digital timepieces, data screens,
promotional signage, wearable screens, and control PIN? DIGITALREAD, DIGITAL READ
panels.

4. Piezo Buzzer - Produces sound using


piezoelectricity, converting electrical energy into What is the 2 PINMODE IN ARDUINO?
mechanical vibrations. Alerts, timing Ex ans. 0, 1 INPUT, OUTPUT, OUTPUT,
mechanisms, electronic device notifications, INPUT
musical playthings, and user interface responses.
THE ____ FUNCTION WILL ONLY RUN
5. Linear Actuator - Transforms circular ONCE, AFTER EACH POWER-UP OR
motion into straight-line motion, delivering either RESET OF THE BOARD. SETUP
pushing or pulling movement along a linear path.
Linear actuators convert What is the 2 STATE OF PINS (VALUE)
rotational motion into linear motion for precise IN ARDUINO? Ex ans. 0, 1 HIGH, LOW,
pushing or pulling along a straight line. They're used
in robotics, automotive, aerospace, medical, and
LOW, HIGH
agricultural industries for tasks like machinery void _______ ( ) { } - This function is run
control, adjustable seating, aircraft mechanisms, and
more. AFTER setup has finished. All of the code
within the curly braces will be run again,
and again, until the power is removed.
LOOP
WHAT COMMAND IS USE TO SET THE
VALUE TO SPECIFIED ARDUINO
DIGITAL PINS? DIGITALREAD
Defined as sending LOW/HIGH or 0/1
signals from one of the digital pins on the
Arduino board (pin 2-13) to the electronic
actuator that recognize on/off or 0/1 signal
DIGITAL OUTPUT

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy