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

Canada Learning Code - Introduction to Circuitry With Arduino - Lesson 2

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

Canada Learning Code - Introduction to Circuitry With Arduino - Lesson 2

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

INTRODUCTION TO

CIRCUITRY WITH ARDUINO

Content developed by Nabeela Merchant for Canada Learning Code


AGENDA

● Learn about circuits


● Build a working model of a traffic light using the Arduino
PROJECT DEMO
WHAT ARE CIRCUITS?
CIRCUITS ARE...

A closed path for electricity to do


something useful.

Electricity flows from the positive terminal


of a power supply to the negative
terminal of a power supply in a circuit.

Along the way, if it passes through other


electrical components, it will power the
electrical component as well.
CIRCUITS + ARDUINO
CIRCUITS + ARDUINO
LED

Breadboard

Resistor
Wires

Ground
(-ve)
Digital Pin 8
(+ve)
CIRCUITS + ARDUINO

Ground
(-ve)
Digital Pin 8
(+ve)
CIRCUITS + ARDUINO

Breadboard
CIRCUITS + ARDUINO
CIRCUITS + ARDUINO
LED
CIRCUITS + ARDUINO
CIRCUITS + ARDUINO

Resistor
CIRCUITS + ARDUINO
CIRCUITS + ARDUINO

Wires
BLINK CIRCUIT
BLINK CIRCUIT
TRAFFIC LIGHTS

Traffic lights were first introduced in 1868 in


London to control the flow of horse carriages
so pedestrians could safely cross the road.

The first traffic lights had only two colours -


red and green.

The three coloured traffic lights we know


today weren’t introduced till 1920.

Traffic lights are great examples of simple


circuits that have had profound effects on
society.
PROJECT

Goal: Build a working model of


a traffic light using an Arduino
and some basic electrical
components.

Model: Write out a detailed


sequence of instructions for
how each light should work.

Starter Code: http://bit.ly/clc-


arduino-2
PROJECT
http://bit.ly/clc-arduino-2 1.

2.
PROJECT

1. Place the red LED such that the longer leg (+ve) is on your right.
2. Connect a resistor to the right leg of the LED.
3. Connect the right side of the resistor to digital pin 11.
4. Connect the left side of the LED to the ground rail.
PROJECT

1. Place the yellow LED such that the longer leg (+ve) is on your right.
2. Connect a resistor to the right leg of the LED.
3. Connect the right side of the resistor to digital pin 10.
4. Connect the left side of the LED to the ground rail.
PROJECT

1. Place the green LED such that the longer leg (+ve) is on your right.
2. Connect a resistor to the right leg of the LED.
3. Connect the right side of the resistor to digital pin 9.
4. Connect the left side of the LED to the ground rail.
PROJECT

1. Connect the ground rail to the GND pin on the Arduino Uno.
2. Connect the Arduino Uno to the computer using the USB cable.
PROJECT
http://bit.ly/clc-arduino-2
Code bank:
pinMode(green, OUTPUT);
// sets the green LED pin as OUTPUT

digitalWrite(green, HIGH);
// turns the green LED on

digitalWrite(green, LOW);
// turns the green LED off

delay(1000);
// creates a pause of 1 second (1000 milliseconds)

You might also like