Traffic light programming challenges

Slides:



Advertisements
Similar presentations
Log In with RF LCD Clickers Channel 65. Log In with your Clicker This is what the clicker looks like Here are the steps: 1.Click on CH button 2.The light.
Advertisements

Do you think that this bulb will light up? Build the circuit and check your prediction Fix the circuit so that the bulb does light up. A.
Dr. Gary Stewardson, Raymond Boyles Hello again, Sparkey here. Slippery and I will help you explore how to create a program that simulates outputs on a.
Photos and Sensor Instructions
PICS / Microcontrollers
Lesson 2.2 Traffic Signals  Today’s Objectives: 1. Explain what to do at a green, yellow, and red light. 2. Describe the action to take when you approach.
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
Control the movement of traffic Give commands or set limits No U-Turn.
Photos and Sensor Instructions
Traffic Lights Green Light- GO – You can proceed only if the intersection is clear. When approaching a green light, check traffic to the left, right, and.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
Slide 1 Computers or people? Teacher resource 5.1.
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.
PLC programming Part 3: Problems with solutions. Topics  Every problem is devided into three parts:  Technology description contains the general properties.
AS Computer Studies Finite State Machines 1.
micro:bit for primary schools – mb4ps.co.uk
CS4101 Introduction to Embedded Systems Lab 1: General Purpose IO
micro:bit for primary schools – mb4ps.co.uk
COMP211 Computer Logic Design Introduction to the DE2 Board
ECEN 248 Lab 9: Design of a Traffic Light Controller
1st Grade Test Review Tech Test Q & A Spring 2011.
Programming Scratch to Control a K’NEX Fairground Ride
Lighting LEDs with a RASPBERRY PI
Hacking Minecraft on the Raspberry Pi using Python
micro:bit for primary schools – mb4ps.co.uk
What is Life? Evidence vs. Inference.
Create a paper craft for any object that makes a sound
Raspberry Pi: External Inputs & Outputs
Physical Computing with the Raspberry Pi (Pibrella / micro:bit)
Raspberry Pi with Pibrella
Game Controller Introduction.
Lesson 3 Sub-Routines.
micro:bit for primary schools – mb4ps.co.uk
micro:bit for primary schools – mb4ps.co.uk
Global Challenge Night Sensor Lesson 2.
Generation 3 Televic Wireless Microphone Instructions
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 3.
Game Controller Lesson Two.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
micro:bit for primary schools – mb4ps.co.uk
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 3.
Photos and Sensor Instructions
micro:bit for primary schools – mb4ps.co.uk
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 3.
Lab 1. Introduction to the DE2 Board
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Lecture 4. Introduction to the DE2 Board
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Let’s use a PUSH-Button!
Global Challenge Flashing Wheels Lesson 2.
Global Challenge Flashing Wheels Lesson 2.
Oregon Robotics Tournament and Outreach Program
Dell Printer Customer Support
2019 Investing Now Summer Program
Presentation transcript:

Traffic light programming challenges 11/19/2018 Raspberry Pi with Pibrella Neil Rickus, Senior Lecturer in Computing Education, University of Hertfordshire @computingchamps Traffic light programming challenges Written by Neil Rickus. Licensed under CC BY-NC-SA 4.0 1 1

Objectives Sequence instructions Use selection (if, then, else) 11/19/2018 Objectives Sequence instructions Use selection (if, then, else) Use repetition Make lights flash and buzzers sound Push the big red button! 2 2

11/19/2018 Your challenge! Swarco, the world leader in LED traffic lights, need some new engineers A selection of their products can be seen on the following slide… 3 3

11/19/2018 Your challenge! Swarco are looking for some new traffic light engineers and want to know if you’re up to the task Can you complete their programming challenges? 5 5

Your computer for today… 11/19/2018 Your computer for today… What do you notice about the computer in front of you? 6 6

11/19/2018 Getting started We're going to be using Scratch to program the Pibrella, which is connected to the Raspberry Pi Firstly, we need to start the GPIO (General Purpose Input Output) Server We'll then turn on the red light These commands are case sensitive, so check you use of lower and upper case (capital) letters carefully 7 7

11/19/2018 8 8

Challenges - Lights Program a key to turn the red light off 11/19/2018 Challenges - Lights Program a key to turn the red light off Program a key make the red light flash Program a key to make the yellow light flash Program a key to make the green light flash Program a key to turn all lights off! Program a key to make the traffic light sequence 9 9

11/19/2018 10 10

11/19/2018 Big red button We're now going to program the Big Red Button to make things happen... We'll start by making it turn a light on Please hold the board by the side as you press the button! 11 11

11/19/2018 12 12

11/19/2018 Challenges Make the green light always on unless the big red button is pushed Make the big red button work light a pedestrian crossing... 13 13

Buzzer Can you make it beep? You'll need to broadcast this command: 11/19/2018 Buzzer Can you make it beep? You'll need to broadcast this command: buzzer1000 buzzer0 (to make it stop!) 14 14