Using LEGO WeDo kits with Scratch

Similar documents
Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Kinect2Scratch Workbook

Creating Computer Games

Lab book. Exploring Robotics (CORC3303)

Agent-based/Robotics Programming Lab II

In this project you ll learn how to create a times table quiz, in which you have to get as many answers correct as you can in 30 seconds.

Step 1 : Earth and Mars Orbit the Sun

In this project you ll learn how to create a platform game, in which you have to dodge the moving balls and reach the end of the level.

Robotics using Lego Mindstorms EV3 (Intermediate)

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Copyright 2017 MakeUseOf. All Rights Reserved.

Lesson 2 Game Basics

LS Creative Learnings Pvt Ltd. STEM-Robotics Education. Report for Sep S.B. Patil Public School, Pune

The light sensor, rotation sensor, and motors may all be monitored using the view function on the RCX.

a. the costumes tab and costumes panel

Create Your Own World

In this project you ll learn how to create a game, in which you have to match up coloured dots with the correct part of the controller.

Let s start by making a pencil, that can be used to draw on the stage.

Scratch for Beginners Workbook

Robot Programming Manual

Some prior experience with building programs in Scratch is assumed. You can find some introductory materials here:

Pong! The oldest commercially available game in history

PROJECTS FOR SCRATCH & MOWAY

RUNNYMEDE COLLEGE & TECHTALENTS

Let s start by making a pencil that can be used to draw on the stage.

Programming with Scratch

Studuino Icon Programming Environment Guide

In this project we ll make our own version of the highly popular mobile game Flappy Bird. This project requires Scratch 2.0.

Module. Introduction to Scratch

Create a Simple Game in Scratch

How Do You Make a Program Wait?

understanding sensors

LEGO Mindstorms Class: Lesson 1

Memory. Introduction. Scratch. In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

STEP-BY-STEP THINGS TO TRY FINISHED? START HERE NEW TO SCRATCH? CREATE YOUR FIRST SCRATCH PROJECT!

Pong Game. Intermediate. LPo v1

Add in a new ghost sprite, and a suitable stage backdrop.

Tilt Sensor Maze Game

Introduction to Turtle Art

Module 2 Drawing Shapes and Repeating

Scratch Primary Lesson 5

Using the SparkFun PicoBoard and Scratch

ChatBot. Introduction. Scratch. You are going to learn how to program your own talking robot! Activity Checklist. Test your Project.

Starting from LEARNER NOTES edited version. An Introduction to Computing Science by Jeremy Scott

Open the Tech Toys Scratch project. Your club leader will give you a copy of this project, or you can open it online at jumpto.cc/toys-go.

A. creating clones. Skills Training 5

Creating a Maze Game in Tynker

The Beauty and Joy of Computing Lab Exercise 10: Shall we play a game? Objectives. Background (Pre-Lab Reading)

You are going to learn how to create a game in which a helicopter scores points by watering flowers in the city.

An Introduction to Programming using the NXT Robot:

INTERACTING SPRITES MODULE 3: INVESTIGATION 1. Anima9ng Sprites

Ev3 Robotics Programming 101

Introducing Scratch Game development does not have to be difficult or expensive. The Lifelong Kindergarten Lab at Massachusetts Institute

Instructional Technology Center

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. S4A - Scratch for Arduino Workbook

Fish Chomp. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Rock Band. Introduction. Scratch. In this project you ll learn how to code your own musical instruments! Activity Checklist.

Programming PIC Microchips

Programming I (mblock)

Converting Vinyl Records to CD using EZ Vinyl Converter

Let There Be Light. Opening Files. Deleting National Technology and Science Press

Line-Follower Challenge

S B Patil Public School, Pune

Ghostbusters. Level. Introduction:

Laboratory 7: CONTROL SYSTEMS FUNDAMENTALS

RG Kit Guidebook ARGINEERING

Game Making Workshop on Scratch

Create a game in which you have to guide a parrot through scrolling pipes to score points.

A Day in the Life CTE Enrichment Grades 3-5 mblock Programs Using the Sensors

04. Two Player Pong. 04.Two Player Pong

Electronic Project Interdisciplinary Creation by Amy Barone and Cindy Bronen

Pong! The oldest commercially available game in history

Whack-a-Witch. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

1hr ACTIVITY GUIDE FOR FAMILIES. Hour of Code

GAME PROGRAMMING & DESIGN LAB 1 Egg Catcher - a simple SCRATCH game

Lost in Space. Introduction. Scratch. You are going to learn how to program your own animation! Activity Checklist.

In this project you ll learn how to code your own musical instruments!

A Day in the Life CTE Enrichment Grades 3-5 mblock Robotics - Simple Programs

Studuino Color Sensor Manual

Robotics Workshop. for Parents and Teachers. September 27, 2014 Wichita State University College of Engineering. Karen Reynolds

Erik Von Burg Mesa Public Schools Gifted and Talented Program Johnson Elementary School

AIM OF THE GAME GLACIER RACE. Glacier Race. Ben Gems: 20. Laura Gems: 13

1. ASSEMBLING THE PCB 2. FLASH THE ZIP LEDs 3. BUILDING THE WHEELS

THE TECHNOLOGY AND CRAFT OF COMPUTER GAME DESIGN An introductory course in computer game design

pla<orm-style game which you can later add your own levels, powers and characters to. Feel free to improve on my art

GrovePi Temp-Humidity Sensor Lesson Video Script. Slide 1

The DesignaKnit USB E6000 Link 1 & 2

Brain Game. Introduction. Scratch

Chapter 6: Microcontrollers

Parallax Scrolling Tutorial Created in Drogheda by Seamus Minogue and updated for Clonakilty CoderDojo 15/06/2012 PARALLAX SCROLLING

UCL Micro:bit Robotics Documentation

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. LEGO Bowling Workbook

Project 1: Game of Bricks

ivu Plus Quick Start Guide P/N rev. A -- 10/8/2010

MEDIA CONVERSION PROJECT: DIGITIZING HISTORIC PHOTOS

Flappy Parrot Level 2

CISC 1600, Lab 2.2: More games in Scratch

I.1 Smart Machines. Unit Overview:

Tarocco Closed Loop Motor Controller

Create Your Own World

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Transcription:

Using LEGO WeDo kits with Scratch Before you begin: 1. Download and install Scratch from h:p://scratch.mit.edu 2. Connect WeDo s USB hub to your computer s USB port. 3. Connect the WeDo motor to the USB hub. Scratch Vocabulary Script: A series of icons strung together to perform a task. Sprite: An on- screen character or item that you can manipulate through a script. You can have mulnple sprites within a program and they can interact with one another. Costume: A sprite can have different visual representanons, or costumes. During a program, you can make a sprite switch to a different costume to change its appearance. menu Use this space to display variables and sprites Icons for each menu Click and drag icons from le1 and drop it here to make a program. Click on script to run the program. This will turn on the motor for 1 second. You may also click on commands directly on the le1 pane.

WeDo Motor When you plug the WeDO USB hub into your computer, the motor control icons will appear under MoNon menu. To turn on the motor use one of the following icons: motor on to turn motor on motor power # to turn motor on at a specific power seung motor on for # seconds to run the motor for a specific Nme To turn off the motor use the following icon: Motor DirecCons To specify the motor direcnon use this icon: The motor direcnon icon does NOT turn the motor on. It must be used in combinanon with one of the motor on icons. this way turns the motor clockwise. that way turns the motor counter- clockwise. reverse reverses the motor direcnon from the current seung. that way this way

WeDo Sensors Distance sensor gives you a number between zero and 100 from about 3 to 12. 2 4 1 3 Tilt sensor gives you a number between 0 to 4 depending on orientanon of the sensor. Some possible use for sensors: Using sensor as a switch: Start motor when distance is greater than 10. Start motor when Nlt is 1. Stop when distance is 0 (to prevent running into something) Using sensor as a variable: Set motor speed to the value of distance sensor. Motor moves forward if Nlt is 1; reverse if Nlt is 3. Choose distance or Nlt. Use in combinanon with other icons. Using WeDo along with Scratch screen Control the Sprite s movement using distance or Nlt sensor Count up or down when Nlt sensor is triggered (i.e, a:ach Nlt sensor to a door, count how many Nmes the door has been opened)

Wait Wait block pauses the script for a specified amount of Nme. This script turns on the motor, waits 3 sec, and stops. Wait uncl Turn on the motor when distance sensor reads greater than 30. Forever The Forever block repeats a script indefinitely. The example below connnuously runs the motor with power seung corresponding to the distance sensor value. Add a forever block for a more useful code. Turn on the motor when distance sensor reads greater than 50, off when sensor reads less than 50, and repeat. Note: The motor power block just sets the motor power; it does not turn the motor on. Repeat (#) Repeat block will repeat a script for a specified number of Nmes. This code turns on the motor for 1 sec, then stops for 1 sec, and repeats the process 10 Nmes (total of 20 seconds).

If else If the Nlt sensor is 1 turn the motor on. If it is in any other posinon, turn the motor off. Sprites On- screen characters and items in Scratch are called sprites. The default Sprite is a cat but it can be changed to a different picture. You can also create one yourself. Sprites can be manipulated using the various scripts: Change costume of physical appearance Change posinons, orientanon, or size Interact with other Sprites (i.e., if Sprite A touches Sprite B, do this) and much more. This script connnuously sets the y- posinon of the Sprite to the distance sensor value. You can nest mulnple if- else blocks to create more complex scripts. If Nlt sensor is 1 turn motor on in one direcnon; if 3 turn the motor on in opposite direcnon; if all other values then stop. This script is a varianon of the script above. By numerically manipulanng the distance sensor value, it increases the range of monon of the Sprite to cover the ennre screen. This script moves the Sprite forward when Nlt sensor is Nlt forward, and backwards when the sensor is Nlted backward.

Using Variables Variables lets you see and/or manipulate numbers in your program. You can make mulnple variables in a program. This program connnuously displays the value of the distance sensor on the right side screen. This program adds 1 to the variable counter every Nme the distance reads 0. This allows us to use the distance like a counter bu:on. Wait unnl distance sensor value > 30 is added to ensure that each touch is only counted once. Click on Make a variable to create a variable. Once created, the variable and its value are shown on the screen.

WeDo/Scratch Challenges Build a motorized crane or li1- arm using the WeDo kit. The crane must be motorized and must have a Nlt sensor a:ached to the arm. Program with Scratch so that the motor turns on and stops a1er the the crane is up (according to the Nlt sensor value). Build a game controller with a Nlt sensor so that you can control an on- screen Sprite to go right, le1, up and down as you Nlt the controller. In Scratch, create a maze using a ball (Sprite 1) and walls (Sprite 2). Use the controller to travel through the maze. Bonus: Reverse the motor and lower the crane unnl the arm is down again. Build a rocker switch with a Nlt sensor. The switch should return to zero posinon automancally. Program with Scratch to count how many Nmes the switch has been pressed on each side. This device can be used as a vonng machine for two- choice quesnons.

Motion Looks Sound Pen MoNon icons are used to control the monon and posinon of Sprites. Motor icons also appear here. Use these icons to change the appearance of a Sprite color, size, etc. Sound icons allow you to incorporate sound into your program. Use the Pen to draw lines on the screen during your program. Puzzle piece icons are commands or steps in the program. They snap together to form a program. Rounded rectangular icons are numbers. Hexagonal icons are booleans (True/False or Yes/No).

Control Sensing Operators Variables Control icons introduce flow & structure into your program. Use these icons to detect various acnons such as key input or Sprite interacnons. Use operators to calculate or compare values. Use the Variable icons to store and manipulate numbers. These icons appear once you create a variable. Puzzle piece icons are commands or steps in the program. They snap together to form a program. Rounded rectangular icons are numbers. Hexagonal icons are booleans (True/False or Yes/No).