SCRATCH BUILDER R Q R O B O T C O D I N G G U I D E

Similar documents
Scratch. Construct of Your Imagination

Warning : If user does not follow the instructions in this book properly, a serious injury, harm,

Studuino Programming Environment Manual

Warning : If user does not follow the instructions in this book properly, a serious injury, harm,

Robolab. Table of Contents. St. Mary s School, Panama. Robotics. Ch. 5: Robolab, by: Ernesto E. Angulo J.

AN INTRODUCTION TO SCRATCH (2) PROGRAMMING

Scratch 2.0 Wireless Programming Guide for Vortex

Crossley Fields - Computing Vocabulary

Animate a Name Cards

SMART board Training. April 2014 Erika Kindoll

IMAGE STUDIO LITE. Tutorial Guide Featuring Image Studio Analysis Software Version 3.1

Scratch Lesson 2: Movies Made From Scratch Lesson Framework

InO-Bot. User Guide. 1 InO-Bot User Guide. Product Code: EL00483

Networks Florida Social Studies Primary Source Library K-5 Digital Training Guide

All Blocks of Scratch

Meet the Cast. The Cosmic Defenders: Gobo, Fabu, and Pele The Cosmic Defenders are transdimensional

Studuino Block Programming Environment Guide

Part A: Monitoring the Rotational Sensors of the Motor

Studuino Programming Environment Manual

ROBOLAB Tutorial MAE 1170, Fall 2009

Final Revision. 1)Put ( ) or ( ):

Software User's Guide

SCRATCH. Introduction to creative computing with Scratch 2.0

Chapter 9 Slide Shows

Chapter 9 Slide Shows

Robotics Study Material School Level 1 Semester 2

Networks Florida Social Studies WorkText K-5 Digital Training Guide

The original image. Let s get started! The final result.

Teacher Cheat Sheet - Game Coding Challenges

Computer Science Concepts in Scratch

2. If a window pops up that asks if you want to customize your color settings, click No.

inexio User Guide for Infrared Touch Driver

Fundamentals. Training Kit. Presentation Products, Inc. 632 W 28th St, 7th fl New York, NY f presentationproducts.

Computer Science Concepts in Scratch

Software User's Guide

LME Software Block Quick Reference 1. Common Palette

Software User's Guide

1. Introduction P Package Contents 1.

Adobe Illustrator CS5 Part 2: Vector Graphic Effects

Lost in Space. Introduction. Step 1: Animating a spaceship. Activity Checklist. You are going to learn how to program your own animation!

New to Mac. Viewing Options in Finder:

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

Contents. Introducing Clicker Paint 5. Getting Started 7. Using The Tools 10. Using Sticky Points 15. Free resources at LearningGrids.

User Guide XO Applications

User Manual. Tellus smart

Making a maze with Scratch

1. Introduction P Package Contents 1.

Not For Sale. Glossary

Motors & Wheels. Wheels can be attached to the KIBO s motors to make them spin. The motors can be attached to the KIBO robot to make it move!

Tap on "Notebooks" button (in portrait mode) to start a new notebook.

COMPUTER DESCRIPTION...

ILLUSTRATOR. Introduction to Adobe Illustrator. You will;

Nuffield Centre Dyspraxia Programme NDP3

SLAMWARE. RoboStudio. User Manual. Shanghai Slamtec.Co.,Ltd rev.1.1

IRISPen Air 7. Quick User Guide. (ios)

SmartBoard and Notebook Part 2

MagicInfo-i Premium Edition Author Quick Start Guide

What are different approaches of Computer Art? How can computation create art? 9/17/12. Human uses computer to modify digital images

Lesson 3 Creating and Using Graphics

smart_presentation.notebook January 04, 2013 SMARTboard Overview Jan. 4, 2013 Presented by Linda Joiner Agenda Dec 17 8:11 AM Dec 14 8:41 AM

Publishing Electronic Portfolios using Adobe Acrobat 5.0

ONE HOUR ANIMATION. Will you be a Scratcher upon completion of this session? Definitely. Learn how to write a basic script to animate a sprite.

EV3 Programming Workshop for FLL Coaches

Intermediate Microsoft Office 2016: Word

Center for Faculty Development and Support Creating Powerful and Accessible Presentation

Index. Guide. Camera Detect Event Guide. AcuraVision

Contents. - i - Ver.:2

PURPOSE AND BACKGROUND

Action Builder Manual

User Manual. PIXPRO SP360 4K ( PC Version ) For KODAK PIXPRO SP360 4K Action Cam. Ver. 2.0

Using imovie to create a Digital Video Marshall G. Jones Winthrop University Edited by Lynn Cecil

M O T I O N A N D D R A W I N G

Appbot RILEY. APPBOT Riley User Manual. IN THE BOX. Appbot RILEY. Charging Station Adapter USB Cable Manual

Fundamentals. Training Kit. Presentation Products, Inc. 632 W 28th St, 7th fl New York, NY f presentationproducts.

Discover Robotics & Programming CURRICULUM SAMPLE

CONTENTS Getting Started Using the Livescribe+ Menu

WeDo Mars Rover. YOUR CHALLENGE: Working with a partner, collect rock and soil samples from the Martian crust using your Mars Rover Robot.

2 SELECTING AND ALIGNING

HOW TO USE THE CONTENT MANAGEMENT SYSTEM (CMS) TABLE OF CONTENTS

Table of contents. 2 Samsung Care. 3 Know Your Device. 5 S Pen. 7 Device Setup. 12 Home Screen. 18 Apps. 19 Calls. 20 Voic .

eturboware 4.x For Windows 2000/XP User s Guide Part No: M , Ver:1.0

Creating Interactive PDF Forms

Quick Reference Tables

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

(1) (1) English Edition. Tutorial Guide Sony Corporation 2002 Sony Corporation

Adobe PageMaker Tutorial

TouchChat User Guide. For wego A-D Speech-Generating Devices. Find more resources online:

User Manual. pdoc Pro Client for Windows. Version 2.1. Last Update: March 20, Copyright 2018 Topaz Systems Inc. All rights reserved.

LAMP Words for Life User s Guide

Power Point* Quick Start. 1. Start Power Point (PP) by 2x click on the PP icon in the program folder.

Chapter 9 Slide Shows

Technoversity Tuesdays

ebooks & ecomics WHAT: Book Creator is an ipad and Android app that lets you design and publish your own customized ebook.

Create a Scrapbook Page

Adobe Illustrator A Hot Air Balloon Sky Scene In this tutorial, we'll explain how to create a fun sky scene with hot air balloons.

epos Touchkit Manual (for Windows XP)

Tutorial: Making Legobot Move Steering Command Brighton H.S Engineering By: Matthew Jourden

MODULE TESTS. Explorer

This course will introduce the user to a Mobi and the Workspace software. This tool allows the instructor to annotate and work alongside of the

Transcription:

SCRATCH BUILDER R Q R O B O T C O D I N G G U I D E Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu1 W W W. R O B O B U I L D E R. N E T

01 INSTRALLATION AND SET-UP 1. How to install Scratch Scratch and Scratch Builder need to be installed in the user s computer to control RQ robots with Scratch. >Scratch?: Coding program made by MIT Medial Lab. >Scratch Builder?: Program that helps connecting the robot and Scratch. 1) Go to the Scratch website (www.scratch.mit.edu/) 2) Move down to the bottom of the website 3) Select Offline Editor from Support. SCRATCH BUILDER 2

4) Install Adobe AIR and Scratch Offline Editor in order. 1 2 Scratch has been installed. Shall we install the next program? SCRATCH BUILDER 3

2. How to install Scratch Builder 1) Go to the Robobuilder website (www.robobuilder.net). 2) Select SOFTWARE under SUPPORTS. 3) Download the Scratch Builder software from SOFTWARE and install. 4) Run Setup.exe file. (If this message User Account Control-Do you want to allow this app from an unknown publisher to make changes to your device? appears, click Yes to continue with the installation). 5) Select English 6) Click Next. SCRATCH BUILDER 4

7) On License Agreement, click I Agree. 8) Check the destination folder and click Install. 9) When RQ-USB2UART Driver appears during installation, click Next. SCRATCH BUILDER 5

10) On License Agreement (RQ-USB2UART Drive-related), Check I accept and click Next. 11) Once the RQ-USB2UART Driver Installation has been completed, Click Finish. Continue with remaining Scratch Builder installation. 12) Scratch Builder has been installed. Click Finish. SCRATCH BUILDER 6

13) The Scratch Builder screen opens. The program has been installed. Now, let s learn how to connect the robot with the computer! SCRATCH BUILDER 7

3. How to connect the USB2UART cable when directly connecting to RQ controller. To have Scratch communication with the RQ robot, it needs to be connected with the communication cable (RQ-USB2UART). (If it does not work even when the communication cable is normal, try reinstalling the driver for the communication cable). 1) Connect the RQ-USB2UART to the laptop (PC). 2) Connect the yellow connector of the cable to the yellow port (Communication port) on the back of RQC (RQ controller). 3) Check that the battery s power cable is connected and turn on the RQC power switch. Well done! Let s find out about another way to connect! SCRATCH BUILDER 8

4. How to connect the USB2UART cable when using a Bluetooth chip 1) Connect the Blutooth / RF socket to the yellow port on the RQC. 2) Insert a Bluetooth chip to the socket. 3) Check that the battery s power cable is connected and turn on the RQC power switch. 4) Go to Bluetooth device manager in your PC. Click Add Bluetooth or other devices and choose RBT1111XXXX (Password is 1234 or 0000). 5) Run Scratch Builder software and select the Comport where the Bluetooth is connected, and click Connect to make a connection. *If the connection fails, turn off and on the RQC and retry. SCRATCH BUILDER 9

02 UNDERSTANDING SCRATCH BUILDER 1. Open Scratch Builder When you are ready with the RQ robot to control with Scratch, open Scratch Builder. 1) Open Scratch Builder on the desktop screen. 2) Select Connect to make a connection for communication. 3) Select Auto Connect for automatic connection. Once the connection has been established, the Connect icon turns green. SCRATCH BUILDER 10

4) Select New Scratch 5) Click New on the Left to create a new file. Choose a robot platform and enter a file name. When creating a new file. Select a robot platform between the 3 choices. RQ Robot covers all RQ kit series from +110 to the end, and Non-standard is for models that user created. SCRATCH BUILDER 11

6) A Scratch file under the given name is created. Double click the file to run the Scratch software. 7) Click More Blocks in purple on the Scratch screen to show the exclusive blocks for the RQ robot (Nothing shows on More Block when Scratch is opened without Scratch Builder). Now Scratch Builder is opened, should we learn how to use Scratch? SCRATCH BUILDER 12

2. Understanding the Scratch screen Let s learn how to control the RQ robot with Scratch. Language, Font size Code start and stop Duplicate, crop, size adjustment Sprite that moves as coded Block Palette: Divided into 10 block menuscorrespond to different functions X, Y coordinates of the Sprite s position Scripts area: The space to code with Scratch. Scripts: Bring block commands from the palette to combine and use. Costumes: Draw, edit or open an image. Sounds: Open and use a sound file or record. Sprite block: -Shows the Sprite in unit. -Edit the Sprite. Combine various blocks from the palette to create a Scratch program. Adjust the block size in the script space. It looks complicated, but you will soon become familiar as you follow step by step. SCRATCH BUILDER 13

3. Basic Scratch blocks No. Color Item Function 1 Motion Move Scratch s Sprite in various ways (location change, angle, etc). 2 Event Select how to start the Scratch. 3 Looks 4 Control Change the shape, background, color, speech bubble and form of show and hide. Control the block progress-run time, repetition (repetition time, infinite), condition, etc. 5 Sound Play sound from the PC and play various sounds. 6 Sensing Select various conditions. 7 Pen 8 Operation Select the method for erase, stamp (duplicate) and pen. Select operation-related matters like the four arithmetical operations, a sign of inequality, and logical operation. 9 Data Create variables and lists. 10 More blocks Special blocks to control the RQ robot. SCRATCH BUILDER 14

More block is a special block that is necessary for RQ robot control. Let s learn more about More Blocks. 4. Using RQ robot control-related blocks (More Blocks) 1) Moving forward, backward, left, right and more movements. C A B D Matches between the direction options on Scratch builder and the buttons on remote controller. SCRATCH BUILDER 15

(1) Call motions -Move forward -Move backward -Turn Left -Turn right Some robots move differently depending on its design, but for all robots, pressing the arrows make the motor rotate to move the robot. SCRATCH BUILDER 16

(2) Set wheels -Move forward -Move backward -Turn Left -Turn right The number inside the block is the speed level. 1 means speed level 1, and 2 means speed level 2. SCRATCH BUILDER 17

(3) Rotation motor s direction and speed CW stands for clockwise and CCW, counterclockwise. This block directly controls the motor s rotation directions. SCRATCH BUILDER 18

2) LED (1) Turning on the LED Selecting the LED color Selecting the LED module (2) Turning off the LED Selecting the LED color Turning on Red for LED1 Turning on Blue for LED1 Turning on Red and Blue for LED1 Turning on off LED1 Turning on Red for LED1 and 2 Turning on Blue for LED1 and 2 Turning on Red and Blue for LED1 and 2 Turning on off LED1 and 2 SCRATCH BUILDER 19

(3) Make the red LED and the blue LED blink 10 times in sequence. (4) Make the red and the blue LED blink 10 times at the same time. (5) Make the red LED and the Blue LED blink 10 times very quickly in sequence. (6) Make the red and the blue LED blink 10 times very quickly at the same time. A good combination of LED blocks and makes a great LED lighting. SCRATCH BUILDER 20

3) Using Melody (1) Turning on a melody Selecting a melody Selecting a scale (2) Turning off the sound Turn off the melody My favorite is Twinkle, Twinkle, Little Star. What is yours? SCRATCH BUILDER 21

(3) Turn on the melody Twinkle, Twinkle, Little Star. (4) Play Twinkle, Twinkle, Little Star for only 5 seconds. (5) Play Do for 0.5 seconds. (6) Play Do, Re, Mi for 0.5 seconds. (7) Play Do, Re, Mi for 0.5 seconds (repeat 3 times) (8) Play Do, Re, Mi for 0.5 seconds each and pause1 second in between each note. It s this easy to make the robot play sounds. Shall we make a nice song? SCRATCH BUILDER 22

5. Using RQ robot sensors Unlike other blocks, the sensor block needs to be used together with another blocks with different conditions. 1) Sound sensor If the sound sensor detects sound louder than 50, Example (1) If the sound sensor detects sound louder than 50, Move forward. (2) If the sound sensor detects sound louder than 50, play Twinkle, Twinkle, Little Star. (3) If the sound sensor detects sound louder than 50, blink the red and the blue LED 10 times in sequence. SCRATCH BUILDER 23

2) Touch sensor If the touch sensor is on, Example If the touch sensor is off, Connect the touch sensor to number 1 and number 3 sensor port of the RQC (Smart controller). Choose between or (1) If the touch sensor number 1 is on, move forward (2) If the touch sensor number 1 is on, play Twinkle, Twinkle, Little Star. SCRATCH BUILDER 24

3) IR Sensor (Infrared Sensor) If the IR sensor detects a value greater than 50, Example Connect the IR sensor to number 2 and number 4 sensor port of the RQC(Smart controller). Choose between or (1) If the IR sensor detects a value greater than 150, move backward and then stop. (2) If the IR sensor detects a value greater than 150, repeat blinking the red and blue LEDs quickly. SCRATCH BUILDER 25

6. Uploading Scratch code Before the upload, RQ robot should be connected to the computer. See 1-3 How to connect. 1. Code using Scratch 2. Run the Scratch code to check if it works correctly, and then click Save. 3. Save and then close Scratch. 4. On Scratch Builder, click Upload. SCRATCH BUILDER 26

5. Drag the file you have just saved to the bottom left, following the arrow. 6. Click Ok when upload pop-ups appears. 7. Once uploaded, the Upload successful message opens. Click Ok. SCRATCH BUILDER 27

8. Remove the cable connected to the robot. 9. Direct a registered remote to the robot and press the stop button. (When you push the button, the ringing sound plays). 10. Direct registered remote to the robot and press #+4. 11. With the ringing sound, coding begins. 12. If you have coded an infinite loop, press #+Stop to end coding. (When the coding ends, it beeps). SCRATCH BUILDER 28

TIPS! How to change the font size on Scratch Sometimes, the text inside the blocks are so small on the Scratch screen that it s difficult to read. Let s learn how to change the font size for texts inside the blocks. 1) Hold the shift button on the keyboard and click the globe icon to open a hidden function (set font size). 2) Select the font size to 11 to make the font bigger. 3) Select the font size 11 or any number that your prefer to make the font bigger. SCRATCH BUILDER 29

03 PROGRAMMING PRACTICE: WAKING UP RQ-HUNO Learning objective Code to make RQ-HUNO stand up from its lying position. 1. Learn how to make RQ-HUNO stand up (Stand A, B). Standing up when facing the sky (Stand A) Standing up when facing the floor (Stand B) Using Scratch s More blocks and Control, let s code to distinguish whether the robot is facing the sky or facing floor. *Stand A and B motions are some of the basic behaviors including in RQ-HUNO s firmware. 2. Learn how to make RQ-HUNO stand up when it hear a voice. SCRATCH BUILDER 30

1. How to make RQ-HUNO stand (A,B) 1) Select More blocks to use special blocks to control RQ robots. 2) From different blocks in the More blocks, use Call motions to select Button A (Stand A). [List of Call motions] C A B D See that they represent the buttons on the remote. SCRATCH BUILDER 31

3) Drag and drop Call motions block to the script area then select Button A from its drop down menu. 4) Then use the Wait ( ) secs block from Control section. We need this block to secure enough time while Button A (Stand A) is in action. 5) Button A motion requires about 2 seconds. Not to interrupt the next block, use Wait ( ) secs block to secure enough time. 3 seconds are better than 2 seconds for stability. 6) Put down RQ-HUNO as shown in the picture and click the Scratch block. RQ-HUNO then stands up from its lying position. Now that RQ- HUNO stood up. Let s make it walk. SCRATCH BUILDER 32

TIPS! When the Scratch block is running, a yellow band forms around the blocks. When the yellow band is gone, it means the Scratch block motion has ended. 7) The block below will make RQ-HUNO stands up and takes a step forward. Let s make RQ- HUNO walk further! 8) Select Repeat block from Control section, then place it above the Call motions button block. Then change the time to 3. Let s run the code and see what happens. SCRATCH BUILDER 33

9) Put down RQ-HUNO as shown in the picture and click the Scratch block. RQ-HUNO stands up and takes 3 steps forward. This time, we are going to make a melody play while RQ HUNO is in motion and stop when all motions are finished 10) To play a melody while RQ-HUNO is in motion, let s use Sound on/off blocks from More blocks. 11) Put down RQ-HUNO as shown in the picture and click the Scratch block. RQ-HUNO stands up and takes 3 steps and the melody plays. Once the motion has been completed, the melody also stops. SCRATCH BUILDER 34

12) The Scratch blocks below is for making RQ-HUNO stand up when it falls face down (Stand B). 13) Put down RQ-HUNO (Facing down) as shown in the picture and click the Scratch block. RQ-HUNO stands up and take 3 steps forward with playing the melody. Once the motion has been completed, the melody also stops. 2. How to make RQ-HUNO stand up when it hears a voice. Use the same blocks we made from the chapter 1. We add more lines to make RQ- HUNO hears a voice. 1) Let s make Scratch blocks as shown in the picture below. Use the same blocks from previous chapter. Let s find out how we can use to detect a voice. SCRATCH BUILDER 35

2) Drag Sound sensor block with the mouse to insert into. 3) Enter 50 as the basic sound volume in the blank. This means The value of detected sound is greater than 50. TIPS! From More Blocks, check, then will appear on the top left stage. If the robot s power is on and the communication connection has been made properly, the volume of sound around the robot is displayed with a number. When using the sound detection function in Scratch, check the volume of sound measured before setting a basic value. For example, if the volume of sound measured is 60, set the basic value to 50 for stable sound detection. In other words, it is better to set the basic value a slightly lower than the actual measurement. For reference, the sensor values for the sensors other than Sound sensor block will not appear immediately. SCRATCH BUILDER 36

You can not detect sound only with. You will need a conditional block. 4) Select If then block from Control blocks to make blocks as below. Condition Execution It is the part that says If the value of sound measured is greater than 50, then execute XXXX. Drag the conditional phrase block to cover the block that you created already. 5) A conditional block like if may not work even blocks have been inserted into if part. This is because it only performs once and then does not repeat. Use Forever block from Condition block section to repeat specific blocks infinitely. We use Forever block with If block to detect sound at any time. SCRATCH BUILDER 37

6) Lastly, place Wait ( ) secs block under Sound off block, then put 1 second in the blank If there is no Wait 1 secs block, the program starts from the beginning as soon as the sound is turned off with Sound off block, then it can detect the sound from robot moving. That is why it waits for one second after the sound is turned off. 7) Put down RQ-HUNO as shown in the picture and click the Scratch block. When you click, it does not do anything. But when you shout, Wake up., or clap to make some noise, RQ- HUNO stands up and take 2 steps forward with playing the melody. 8) If you change Call motions block as below, RQ-HUNO will stand up and move 2 steps when RQ-HUNO lays face down. SCRATCH BUILDER 38

Issued date: January 9 th, 2018 Publisher: Robobuilder Co.,Ltd. Address: B-611, DMC Hi-tech Industry Center, Seongam-ro 330, Mapo-gu, Seoul, Korea 03920 Tel: +82-2-3141-5101 E-mail: sales@robobuilder.net Web: www.robobuilder.net Copyright by Robobuilder Co.,Ltd. All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means, without the prior written permission of the publisher.