Introduction to Scratch

Slides:



Advertisements
Similar presentations
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Advertisements

30 min Scratch July min intro to Scratch A Quick-and-Dirty approach Leaving lots of exploration for the future. (5 hour lesson plan available)
Michael Parkes Dudley LA What can Scratch do? Make simple games, animations, presentations and stories.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
位準量測 量測槽或桶內物體之高度值 直接式:日常生活中較常使用之方法 推論式:較適合遠距離監測應用.
Scratch Workshop Thursday, August 26, 2010.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
Scratch Another computer programming language Developed by MIT in 2003
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Using MIT Scratch for Programming and Control Exercise 1 Creating movement Year 11 DTG 2012.
From last time… Explore the blue commands from the motion menu Find at least three ways to get the sprite to move to the UPPER LEFT corner.
Algorithms in Scratch How to plan your code. Algorithms Algorithms provide computers with a set of instructions or a set of rules. They are written BEFORE.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
 SCRATCH is a new programming language that lets you create your own interactive stories, animations, games, music, and art.
Scratch Part 2 – Character Commands. What does a command do?  Commands in programming allow an object whatever it is to do something. In the case of.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
Scratch Lesson 1. Creating an account Open the internet browser : Safari or Internet Explorer Type in the URL scratch.mit.edu Using your school computer.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Scratch Programming Cards
How Do You Make a Program Wait?
The Corridor Challenge
Introduction to Scratch
Create a Halloween Computer Game in Scratch
Commands in Scratch.mit.edu
Broadcasting (Adding a new level)
An Introduction to VEX IQ Programming with Modkit
Scratch for Interactivity
An Introduction to Alice (Short Version)
What is it?! •Scratch is a programming language that allows you to create interactive stories, music, animations, art, games, and more!
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Module 2: Investigation 1
Intro to Programming with Scratch
Unit 2 Getting Started With
Control Structures
Scratch – Simple Programming
COORDINATE GEOMETRY For example: Main Street runs from A2 to H2, and the City Middle School can be found at G5. In some towns, streets are laid out in.
Introduction to Object-Oriented Programming
Introduction to.
Introduction to Coding
Learn… Create… Program
Getting Started with Scratch
Alice Variables Pepper.
Line Following Behavior
Go to =>
Learn… Create… Program
Recap the basics Lesson 1.
Introduction to TouchDevelop
An Introduction to VEX IQ Programming with Modkit
Using the sensor Lesson 5.
Go to =>
Go to =>
How Tall Are You? Introducing Functions
Getting Started with Scratch
Code to Enhance Learning
Introduction to Snap Programming
Recap the basics Lesson 1.
Learn… Create… Program
Learn… Create… Program
Using the sensor Lesson 5.
Scratch Lesson 2.
Obstacle Detection.
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Presentation transcript:

Introduction to Scratch

Session 1. What is Programming

What is Programming? Programming is to instruct computer to work. You can program and create: Apps Games Animations

Scratch Scratch is the language you program to create stories, animations and games.

Let’s Start Step 1. Open browser and goto “scratch.mit.edu”

Let’s Start Step 2. Type in your Username and Password (written on the paper) Step 3. Click “Create”

Try this! Step 1: Click “Sound” at Scripts Step 2: Drag “play sound meow until done” block to here

Try this! Step 5. Click the green flag Step 3. Click at “Events” Step 4. Drag this block and put on top of play sound block.

Congratulations! You just created your first program! All Program should start with a Hat block. This tells the Program to start when Green Flag is clicked! This tells what Program should do, and you make the cat meow!

Try this! Step 3. Click Green Flag Step 2. Drag “say Hello! for 2 secs” to under “when green flag clicked” block Step 1. Click “Looks”

Explore! Change the number of seconds as below and see what happens!?

Try this! Step 2. Click Green Flag Step 1. Drag “play sound meow until done” to below “say Hello! for 2 secs”

Try this! Step 4. Click Green Flag Step 3. Drag “play sound meow until done” to above “say Hello! for 2 secs”

Sequencing Why is the difference? You can add blocks above or below any other blocks, and they always run step by step from top to bottom.

3 things to remember.. 1. Use Hat Block to start a program 2. Program always run from top to bottom 3. Select the character you want to program

Repeat Block Repeat block repeats “inside blocks” for a number of times. Repeat how many times Inside Blocks

How many times does boy say “Hello”? forever

mBot

超聲波傳感器 (Ultrasonic Sensor)

Distance Detection 超聲波亦可以用來測量物件與障礙物的距離。 原理是物件向著障礙物發出超聲波,超聲波在空氣中傳播,並碰到障礙物後返回來。根據超聲波一來一回的時間來量度物件與障礙物的距離。

Ultrasonic sensor Step 1. Add these commands and click Green Flag. Step 2. Move your hand away or towards the ultrasonic sensor, and observe what happens to the distance variable.

Exercise Program the mBot to keep moving forward, but stop when there is object in its way.

Challenges !

MAZE I

Tips – MAZE I When there is wall in front and at the left of the mBot, right turn should be performed, vice versa. To avoid crashing wall when moving forward, something should be added in to the program.

Tips – Mechanics to avoid crashing

MAZE II

MAZE III

Tips – MAZE III Involve T-shaped intersection.

MAZE IV