Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Submarine Programming Guide

Submarine Programming Guide

Published by chongwanleng_1991, 2015-06-27 03:09:30

Description: Submarine Programming Guide

Search

Read the Text Version

© ALL RIGHTS RESERVED

Exercise 1: Movements• Create a program in the Scratch software to allow the Submarine propellers to turn in a different direction. – Set the value of the motor direction block to “that way” (clockwise). – Set the value of the motor direction block to “this way” (anti-clockwise). Any unauthorized reprint or use of this material is prohibited.

Exercise 2: Tilt Sensor (Remote Control)• Attach a tilt sensor to the Submarine. Create a program that will make use of the tilt sensor to act as a remote control. – When the tilt sensor is tilted toward the right (2), the propellers will turn in the clockwise direction. – When the tilt sensor is tilted toward the left (4), the propellers will turn in the anti-clockwise direction. Any unauthorized reprint or use of this material is prohibited.

Exercise 3: Tilt Sensor (Remote Control)• Modify the program from Exercise 2. – When the tilt sensor is tilted toward the right (2), the propellers will turn at a motor power of 20 and “Ripples” sound will be played. – When the tilt sensor is tilted toward the left (4), the propellers will turn at a motor power of 100 and “WaterRunning” sound will be played.• Click on the “Sounds” tab to import the sound files. – Click on import > Effects > Select the sound file name Any unauthorized reprint or use of this material is prohibited.


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook