V-tech world.
Ready to see how tech is changing the world?
New video ...
Smart basket with servo motor and IR sensor..
https://youtu.be/SzV3sjnAvq0
07/11/2024
Hello, my friends! It's learning time.
Today, we'll talk about something we see every day but might not know much about: the 7-segment display. It's an electronic component that shows numbers from 0 to 9.
How it works:
The display consists of 7 LED segments arranged in a shape. When we need to display a number, we light up the appropriate segments. There are two types of this display: common cathode and common anode. This means we can connect the common pin to either 5V or 0V, depending on the type. For a common anode 7-segment display, we turn on an LED by writing "LOW" to its pin.
Example: Displaying the number 3 on a common cathod 7-segment display.
We need:
- 1x 7-segment display
- 1x Test board
- 1x Arduino UNO
- 8x Connecting wires
- 1x 220Ω resistor
Steps:
1. Connect the pins to the Arduino:
- Common pin of the 7-seg display --> 5V DC
- Pin a --> Arduino pin 2 (any digital pin)
- Pin b --> Arduino pin 3 (any digital pin)
- Pin c --> Arduino pin 4 (any digital pin)
- Pin d --> Arduino pin 5 (any digital pin)
- Pin e --> Arduino pin 6 (any digital pin)
- Pin f --> Arduino pin 7 (any digital pin)
- Pin g --> Arduino pin 8 (any digital pin)
2. Code for Programming:
Open the Arduino IDE and write this code:
```
a 2
b 3
c 4
d 5
e 6
f 7
g 8
void setup() {
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
pinMode(d, OUTPUT);
pinMode(e, OUTPUT);
pinMode(f, OUTPUT);
pinMode(g, OUTPUT);
}
void loop() {
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
}
```
Happy learning!
By Eng. Wajed
Continuing from our last two posts, automatically control in your room lights using an LDR and a Relay.
How It Works:
LDR Detects light intensity.
Relay Controls the power to the light based on the LDR reading.
When the LDR detects low light levels (night) -> the relay turns the light on.
When the LDR detects high light levels (day)-> the relay turns the light off.
by: Eng. Wajed
for music row
Memories by LiQWYD | https://soundcloud.com/liqwyd/
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons CC BY 3.0
https://creativecommons.org/licenses/by/3.0/
Click here to claim your Sponsored Listing.
Category
Website
Address
Lagos