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 Cannon Programming Guide

Cannon Programming Guide

Published by chongwanleng_1991, 2015-11-24 04:32:35

Description: Cannon Programming Guide

Search

Read the Text Version

© ALL RIGHTS RESERVED

Exercise 1: Movements• Create a program in the Scratch software to allow the Cannon to shoot out a Lego block. – Setting the “motor direction” block to “this way” allows it to shoot. – Change the value of the “motor power” block to increase and decrease the shooting power. Any unauthorized reprint or use of this material is prohibited.

Exercise 2: Timed Program Flow• Make changes to the program created in Exercise 1.• This program will allow the Cannon to shoot by turning the motor for 10 secs at a motor power of 50, then the motor will be switched off. Any unauthorized reprint or use of this material is prohibited.

Exercise 3: Tilt Sensor (Remote Control)• Create a program to control the Cannon using a tilt sensor. – In this program, the tilt sensor value of 2 will set the motor power to 50, while the value of 4 increase the motor power to 100. 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