Day 5
Day 5
COMPONENTS REQUIRED:
1. Arduino UNO R3
2. Breadboard
3. LEDs (red, green, blue)
4. Jumper wires as required
5. Resistors (100/200 Ohm)
6. Power cable/ 9V dc battery
7. Program dumping cable
8. Arduino IDE latest version
Detail about Arduino:
"Uno" means one in Italian and was chosen to mark the release of
Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino
Software (IDE) were the reference versions of Arduino, now evolved to
newer releases. The Uno board is the first in a series of USB Arduino
boards, and the reference model for the Arduino platform; for an
extensive list of current, past or outdated boards see the Arduino index
of boards.
Pinout diagram:
About this project:
This simple little project uses an Arduino and some LEDs to
replicate a traffic light. It uses code as an internal timer and continues
to run until you cut the Arduino's power supply .
Source code:
void setup() {
pinMode(10,OUTPUT); //for red light
pinMode(11,OUTPUT); //for yellow light
pinMode(12,OUTPUT); //for green light
Serial.begin(9600); // optional it is to monitor how our code is
//running
}
void loop() {
digitalWrite(10,HIGH); //Red light will turned on for 10 seconds
delay(10000); // delay time declaration
digitalWrite(10,LOW); // after 10 seconds red light will turned off
digitalWrite(11,HIGH); );//Yellow light will turned on for 10 seconds
delay(10000);
digitalWrite(11,LOW); // after 10 seconds yellow light will turned off
digitalWrite(12,HIGH); );//Green light will turned on for 10 seconds
delaly(10000);
digitalWrite(12,LOW);//after 10 seconds green light will turned off
delay(10000); // time for people cross the road
Serial.println(“people can cross the road”);
}
To view the serial monitor window click serial monitor lens icon
on top right corner.
SCHEMATIC:
Connect the jumpers as per our code.
Step1: Connect the ground pin
Yes, I know that there's only one wire where there would usually be two,
but trust me: Follow this exactly the way you see it. I've revised this post over
and over, it's completely correct.
Insert one side of the jumper wire into GND on the board. Lead the other side
to the breadboard. Put it on the far right column on the breadboard, at the top.
This is the ground column. ALL the way to the right. Take a look at the picture
and/or the schematics if you don't understand.
Step 2: Adding the LEDs
Yes, I know that there's only one wire where there would usually be two,
but trust me: Follow this exactly the way you see it. I've revised this post over
and over, it's completely correct.
Insert one side of the jumper wire into GND on the board. Lead the other side
to the breadboard. Put it on the far right column on the breadboard, at the top.
This is the ground column. ALL the way to the right. Take a look at the picture
and/or the schematics if you don't understand.
Step 3: Adding the LEDs
Alright. This is the last part. Take another jumper wire, put it on the same
row that you have an LED on. This is where the wires will go:
Green LED: Port 12, Digital PWM section
Yellow LED, Port 11, Digital PWM section
Red LED, Port 10, Digital PWM section
If you don't understand, check the schematics are refer to the pictures.
Now, upload your code and you're finished!
DAY:
Detail about Arduino:
"Uno" means one in Italian and was chosen to mark the release of
Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino
Software (IDE) were the reference versions of Arduino, now evolved to
newer releases. The Uno board is the first in a series of USB Arduino
boards, and the reference model for the Arduino platform; for an
extensive list of current, past or outdated boards see the Arduino index
of boards.
Pinout diagram:
RASBERRY PI:
What is Raspberry Pi 4? Pinout, Specs, Projects & Datasheet
Raspberry Pi 4 is a dual-display, single-board computer (introduced on
24th June, 2019) and is widely used in automation and robotics. It is
highly economical and has a leg over previous modules in terms of
speed and performance.
This module is tiny, robust, and can fit into difficult-to-reach places. It
is laced with GPIO pins and can be employed for several typical
computer operations i.e. surfing the web, writing programs and
document writing etc.
Raspberry Pi 4 features Gigabit Ethernet, coupled with Bluetooth and
onboard wireless networking.
This device comes with a powerful and efficient 1.5GHz quad-core
processor which is considered the brain of this device. It features
everything needed to process input and store information. This CPU
executes the number of instructions consisting of a computer program.
Two mini HDMI ports are available on the board. These ports are
employed for transmitting audio and video signal between devices.
This machine supports different communication protocols
including I2C, SPI, and UART which are used to lay out the
communication with external devices.
RPi4
For example, if you have PIR or humidity sensors, you can use these
power pins to power up those sensors.
GPIO Pins In Raspberry Pi 4
GPIO pins are general-purpose input/output pins that are used for
connection with external devices. These pins can be configured to
either general-purpose input or general-purpose output pins or as one of
up to six special settings those functions are pin-dependent.
Raspberry Pi 4 Datasheet
Before incorporating this device into your project, it’s wise to scan
through the Raspberry Pi 4 datasheet. The datasheet comes with the
main characteristics of the device. You can download the Raspberry Pi 4
datasheet by clicking the link below.
Raspberry Pi 4 Specs
The following are the specs of Raspberry Pi 4.
Comes with Broadcom BCM2711, Quad-core Cortex-A72 (ARM v8)
64-bit SoC 1.5GHz processor
4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE
Carries Gigabit Ethernet to connect computers in physical space
RAM is available with different memories. Pick from 2GB, 4GB, or
8GB LPDDR4-3200 SDRAM (depending on model)
2-lane MIPI DSI display port
2-lane MIPI CSI camera port
One USB 3.0 port; One USB 2.0 port and One USB-C power port.
2 × micro-HDMI ports that can support 4K display
You’ll find a range of tiny computers in the Raspberry series. They are
used to develop embedded systems and automation projects.
Raspberry Pi Zero is the earlier version of the Raspberry Pi series that
was introduced in Nov 2015. This machine is incorporated with a
single-core 1GHz processor with no Ethernet and WiFi modules on the
board. Moreover, there is only one mini HDMI port available on the
board. And the RAM of this module is 512MB.
While Raspberry Pi 4 is the advanced version of the Raspberry Pi series
and was introduced in June 2019. It is better in terms of speed and
performance compared to the Pi Zero module.
Raspberry Pi4 features a quad-core dual display processor with a CPU
clock speed of 1.5GHz. Plus, it also incorporates an Ethernet port
which is the traditional way to connect devices in a wired local
area network (LAN) or wide area network (WAN), allowing devices to
communicate with each other via a protocol. An Ethernet is a physical
wire on which the data transmits.
Raspberry Pi 4 comes with two HDMI ports that can support two 4K
displays. Plus, the RAM of this module comes in variant i.e. pick from
1GB, 2GB, and 4GB LPDDR4.
Raspberry Pi 4 Applications