Lesson 7 Traffic Lights

Similar documents
Make Music Cards. Choose instruments, add sounds, and press keys to play music. scratch.mit.edu. Set of 9 cards

HEADERS AND FOOTERS. 1. On the Insert tab, in the Header & Footer group, click Header (top of page) or Footer (bottom of page).

MODULE 4: Building with Numbers

Marist EarSketch Lesson 1 Music Remixing, Python, and EarSketch Student Directions

VISSIM Tutorial. Starting VISSIM and Opening a File CE 474 8/31/06

How to Insert Endnotes and Remove the Endnotes Separator Line

VISSIM TUTORIALS This document includes tutorials that provide help in using VISSIM to accomplish the six tasks listed in the table below.

Lesson Sequence: S4A (Scratch for Arduino)

Cite While You Write Plug-In for Microsoft Word. The Cite While You Write plug-in creates an EndNote Web tab in Microsoft Word 2007.

Lab experience 1: Introduction to LabView

SIDRA INTERSECTION 8.0 UPDATE HISTORY

Lab Determining the Screen Resolution of a Computer

Class Notes for Cite While You Write Basics. EndNote Training

The. finale. Projects. The New Approach to Learning. finale. Tom Carruth

APA Style Page Formatting Instructions Microsoft Word Windows Version. Adjust all margins to 1 inch on each side, page in Portrait orientation

Digital Video User s Guide THE FUTURE NOW SHOWING

Step by Step: Format a Research Paper GET READY. Before you begin these steps, be sure to launch Microsoft Word. Third line: History 101

User Guide for Customers Register & Reserve Colours

Quick Start Guide Building and Scheduling a Show

Analyzing and Saving a Signal

Page Numbering for a Thesis or Dissertation

Finale Tips and Tricks For Music Teachers

Chapter 3 The Wall using the screen

Digital Video User s Guide THE FUTURE NOW SHOWING

Any feature not specifically noted as supported is not supported.

Casambi App User Guide

Stage CL. Made for LEDs. Version 1.0

JAMAR TRAX RD Detector Package Power Requirements Installation Setting Up The Unit

Managing Sources and Controlling Text Flow

TV User s Guide THE FUTURE NOW SHOWING. New and Improved Movies On Demand Screen!

User manual. English. Perception CSI Extension Harmonic Analysis Sheet. A en

INTRODUCTION TO ENDNOTE. NTNU University Library, Medicine and Health Library January 2017

Installation & User Manual For. Styluscom. Wired Video Intercom System. Models StylusAB, StylusABK, StylusAS Manual Version 1.

Student resource files

Remote Control Operation

Library help sheet EndNote Online

Footnotes and Endnotes

Model Railway Animation: Part 1, LEDs - Expanded By David King

Some features of children s composing in a computer-based environment. Figure 1. Screenshot of the MelodyMaker application

To complete this document, you will need the following file:

Story of Hollywood. Relative clause Lesson 2

Using Endnote. Introduction

WELCOME TO WURRLYedu

User Guide. Best Seat Help Desk 24 hours a day/7 days a week

FOR WWW TEACUPSOFTWARE COM User Guide

Classroom. Chapter 6: Lesson 33

Finding an article when you only have the title. Slide 1. Slide notes. Page 1 of 18

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

MyTVs Menu. Recordings. Search. What s Hot. Settings

CHAPTER 7 BASIC GRAPHICS, EVENTS AND GLOBAL DATA

Remote Control/Cloud DVR Guide. Special Instructions INPUT:

User Manual. English. Sequencer Control Option BE3200. I en HBM: public

Franchise Broadcast Info

VideoClock. Quick Start

Getting Around FibreWire TV. User Guide. onecomm.bm

EndNote Web Getting Started

Digital Video User s Guide THE FUTURE NOW SHOWING

Physics 105. Spring Handbook of Instructions. M.J. Madsen Wabash College, Crawfordsville, Indiana

COORDINATES AND GEOMETRY MODULE 6: INVESTIGATION 1. Emerging Shapes

SuperStar Basics. Brian Bruderer. Sequence Editors

Written Tutorial and copyright 2016 by Open for free distribution as long as author acknowledgment remains.

PCIe: EYE DIAGRAM ANALYSIS IN HYPERLYNX

EndNote: advanced. Hager Braham, M.S.I. Librarian

Board Production In CircuitPro

EndNote Online. Getting Started Guide (Windows)

The surge protector is located on the floor next to the left plasma tv stand. Just hit the black power button and all equipment should turn on.

User Guide. Best Seat Help Desk 24 hours a day/7 days a week

EndNote Basic: Organize your references and create bibliographies Creating Your EndNote Basic Account

ValuNet Android ManageMyTVs Application User Guide

Classroom. Chapter 3: Lesson 17

Digital Video User s Guide

L-series Instructions for 3D configurator.

2G Video Wall Guide Just Add Power HD over IP Page1 2G VIDEO WALL GUIDE. Revised

EndNote Tutorial Handout Table of Contents

RADIO FREQUENCY SYSTEMS

About Final Cut Pro Includes installation instructions and information on new features

Rako App Guide. A Rako lighting system can be controlled by the App if the system meets the following requirements:

Classroom. Chapter 2: Lesson 7

Pattern Creator/Converter Software User Manual

Android ManageMyTVs Application User Guide Version 3.0

LA-1440 and LA-4440 Sound Level Meter

USING ENDNOTE ON A MAC (with APA examples) Version 1

Scheduler Activity Instructions

LEGO MINDSTORMS PROGRAMMING CAMP. Robotics Programming 101 Camp Curriculum

Connecting You to the World YADTEL TV. User Guide

MyTVs App for Android TM

Introduction to EndNote. Presented October 3, B.C. Women and Children s Hospital

Mackie Control and Cubase SX/SL

Casambi App FAQ. Version Casambi Technologies Oy.

IPTV Middleware ipad ManageMyTVs Application User Guide

Talis Aspire Reading Lists: saving bookmarks

IPTV User s Guide THE FUTURE NOW SHOWING

Exercise #1: Create and Revise a Smart Group

Table of content. Table of content Introduction Concepts Hardware setup...4

Welcome Packet and Quick Start Guide

Experiment: Real Forces acting on a Falling Body

E-BOOK // SAD FAIRY TAIL MUSIC

EndNote X6 Workshop Michigan State University Libraries

CLA MixHub. User Guide

Digital Tool Programming for Families: Tumblebooks and Storybird on tablets Chinook Regional Library, Saskatchewan

Transcription:

Lesson What you will learn: how to set variable values to strings (sets of characters instead of numbers) how to use IF ELSE how to use Boolean logic NOT Contents Exercise 1: Creating the Traffic Light Sprite... 2 Exercise 2: Drawing the Road... 3 Exercise 3: Introducing the Cars... 5 Introduction to Scratch Programming (2 nd Edition) Page 1 of 9 ZigZag Education, 2013

Exercise 1: Creating the Traffic Light Sprite 1. Open a new Scratch Project. 2. Delete the cat. 3. Click the Paint new sprite option below the stage. 4. Draw the traffic light as shown. 5. Working on the Costumes tab, make three copies and set the colours in each costume as shown. Name each costume as shown: green, amber, red, and redamber. Introduction to Scratch Programming (2 nd Edition) Page 2 of 9 ZigZag Education, 2013

Exercise 2: Drawing the Road 6. Click on the stage icon and draw a new background. 7. Draw the road layout as shown. 8. Make a variable called leftright. 9. Still working on the stage, create the script as shown. Introduction to Scratch Programming (2 nd Edition) Page 3 of 9 ZigZag Education, 2013

10. Working on the traffic light sprite, create the script as shown. 11. Now make three copies of the traffic light script and position them on the stage as shown. Check that the lights cycle through in the correct order before you continue. Introduction to Scratch Programming (2 nd Edition) Page 4 of 9 ZigZag Education, 2013

Exercise 3: Introducing the Cars 12. Click the Choose new sprite from file option and get two cars as shown. 13. Resize the sprites to an appropriate size. Choose new sprite from file and reduce size buttons as shown. We want the sprites to stop and start according to the lights. 14. Make variables called gostop1 and gostop2. Remember: We want the sprites to start at opposite sides of the screen. We want the sprites to stop when the lights are not green. The thick white line around the area where the roads cross is very important. Introduction to Scratch Programming (2 nd Edition) Page 5 of 9 ZigZag Education, 2013

15. Working on the first car sprite, create the script as shown. This sets the variable gostop1 to go. This sets the start position in this case to the left of the road (you have to decide the best position in your own project). If gostop1 = go, then the sprite will move 9 steps; if not (else), it will move zero steps. If the car is touching the white line AND the lights are NOT set to green, then the variable sets to stop and the car stops. 16. Working on the second car sprite, set the script as shown. This sets the variable gostop2 to go. This sets the start position in this case to the right of the road (you have to decide the best position in your own project). If gostop2 = go, then the sprite will move 9 steps; if not (else), it will move zero steps. If the car is touching the white line AND the lights are NOT set to green, then the variable sets to stop and the car stops. Introduction to Scratch Programming (2 nd Edition) Page 6 of 9 ZigZag Education, 2013

The cars shown now go on the green lights. They stop at the white line on the red and amber lights (lights NOT green). Introduction to Scratch Programming (2 nd Edition) Page 7 of 9 ZigZag Education, 2013

Extension Task Setting the Lights for the Opposite Direction 1. Make a new variable called updown. 2. Working on the stage, create a new script that sets the variable updown to the opposite settings as the variable leftright. 3. Copy one of your existing traffic light sprites and change the script as shown. Introduction to Scratch Programming (2 nd Edition) Page 8 of 9 ZigZag Education, 2013

4. Copy your new up/down traffic light three times and arrange them on the stage as shown. Now introduce new sprites for cars travelling on the up and down road. What about pedestrians safely crossing? Introduction to Scratch Programming (2 nd Edition) Page 9 of 9 ZigZag Education, 2013