Raspberry Pi: External Inputs & Outputs

Slides:



Advertisements
Similar presentations
Alarms : Design Technology 4D. Alarms are used for lots of different reasons. Can you think of ways that alarms are used? Warn of fires Warn of Burglars.
Advertisements

In this presentation you will:
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
Copier Jam Detector Design Problem
Embedded Programming and Robotics Lesson 1 Basic Electricity and Electronics Transistor Basics Lesson 1 -- Basic Electricity1.
Alarm Clock Robert Stuart. 1.Keep track of time. 2.When the time matches a stored value an alarm should go off. 3.Functionality that allows for the user.
Embedded Programming and Robotics
PICS / Microcontrollers
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
Open and Closed Loops Standard Grade Computing Studies.
Ch4 Electronic Components Circuit/Schematic Symbols.
1 Applied Control Systems Technology. 2 Pin configuration Applied Control Systems.
Practice Problems to become familiar with circuits and circuit diagrams.
The Green Cross Code is a set of steps to help you cross the road. Remembering the Green Cross Code when you cross the road will help you get to the other.
Basic Stamp OEM module By Wilmer Arellano. 2  The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. 
L ILY P AD T RAINING C ENTENNIAL E LEMENTARY 2012 Material by Linz Craig Revision by Sarah Bloms Additional images by Modkit & Adam Meyer.
ME456: Mechatronics Systems Design Lecture 3 Chapter 2: Lights On –Lights Off Prof. Clark J. Radcliffe Mechanical Engineering Michigan State University.
Introduction The goal of this project was to create device similar to a DJ mixing board. Features: Controlling the input and output buffers Applying sound.
IMetos Wireless sensor Networks. Definitions I : Radio WAP(W ireless A ccess P oint ) The WAP is the radio interface needed to command the iMetos3 radio.
Basic Stamp OEM module By Wilmer Arellano. 2  The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. 
Working “Control any electrical device with your T.V remote(any brand)” wizardelectronics.weebly.com.
Copier Jam Detector Design Problem
Basic Stamp OEM module By Wilmer Arellano. 2  The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. 
Lesson 2 Inputs. Lesson objectives To understand how inputs can be used to control an output To consider how to make mimics more realistic.
CIRCUITS AND. Standards SPI Identify how simple circuits are associated with the transfer of electrical energy when heat, light, sound, and chemical.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
PLC programming Part 3: Problems with solutions. Topics  Every problem is devided into three parts:  Technology description contains the general properties.
Electronic Instrumentation Project 204 Project Name: Light Level Monitor Student #1: Name ID Student #2: Name ID Student #3: Name ID.
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
Sensors Control Systems with Flowol.
AS Computer Studies Finite State Machines 1.
Wireless Relay HDL-MPR01-RF.18.
Arduino Development for Beginners
You have 5 minutes to look over your homework and with a green pen answer the question in your book or make a correction Start Timer 5 mins
COMP211 Computer Logic Design Introduction to the DE2 Board
WORKSHOP LED CONTROL.
Wireless Relay HDL-MPR02-RF.18.
Programming Scratch to Control a K’NEX Fairground Ride
Traffic light programming challenges
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Raspberry Pi with Pibrella
Churchmead Design Technology
micro:bit: External Inputs & Outputs
Welcome to Digital Electronics using the Arduino Board
Copier Jam Detector Design Problem
Global Challenge Flashing Wheels Lesson 3.
Game Controller Lesson Two.
Pass The Ball.
Is there anything we can do to keep from going into this state?
Global Challenge Flashing Wheels Lesson 3.
Answer Grid – 3 & 4 Step Equations
Global Challenge Flashing Wheels Lesson 3.
Lab 1. Introduction to the DE2 Board
Global Challenge Flashing Wheels Lesson 3.
Aeroponic Engineering and Vertical Farming
Lecture 4. Introduction to the DE2 Board
Global Challenge Flashing Wheels Lesson 3.
Arduino Uno circuit basics
Let’s use a PUSH-Button!
Global Challenge Flashing Wheels Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Objective of the lesson
Global Challenge Flashing Wheels Lesson 3.
Presentation transcript:

Raspberry Pi: External Inputs & Outputs Objective: to be able to program the Raspberry Pi to make use of external inputs and outputs.

External Inputs & Outputs You can do even more with the Raspberry Pi by connecting it external input and output devices. This simple Input/Output board will help you learn how to work with external components. It features 3 LEDs, 3 switches, a button and a speaker.

Activity 1 In pairs, look at the program below and write out what you think might happen when it runs on a Raspberry Pi: What would you expect the Raspberry Pi to do?

Activity 2 Download and open the starter program on your Pi. Connect the Input/Output board to the pins on your Pi using male-female breadboard jumpers as shown below:

Give an example of how selection is used in the starter program. Activity 3 In pairs answer the following questions: Question Answer Give an example of how selection is used in the starter program. Does anything happen to the LEDs when the button is pressed? If so what happens?

Place a screenshot of your completed code here Activity 4a The starter program could be considered a basic alarm system, with the Button representing a pressure pad under a mat. However, a single red LED won’t attract much attention, so let’s improve it by making it flash. Place a screenshot of your completed code here Adapt the program to make the red LED flash on and off while the button is pressed and stop when the button is released.

Place a screenshot of your completed code here Activity 4b Connect pin 18 to LED 3 and adapt your program so that the green LED is on when the button is NOT being pressed. This will indicate that the alarm is on but hasn’t been activated. Place a screenshot of your completed code here

Place a screenshot of your completed code here Activity 4c Connect pin 23 to the buzzer on the INPUT/OUPUT board. Change the program so that when the alarm is activated the buzzer goes off. Tip: this example code will turn the buzzer on: Place a screenshot of your completed code here

Place a screenshot of your completed code here Activity 4d Connect pin 24 to Switch 1 on the Input/Output board. Adapt your program so that the alarm is only active when Switch 1 is closed. Tip: the example code below will activate the buzzer when the switch is closed: Place a screenshot of your completed code here

Challenge Develop a program to control the lights the driver sees at a pelican crossing, based on the following description: The lights stay green until the pedestrian presses the button. 15 seconds after the button is pressed the light changes to amber for 3 seconds before changing to red. After 10 seconds have passed the red light should be turned off and the amber light should flash for 3 seconds before turning green again. This whole process should be repeated continually.