eighth grade robotics kittatinny regional high school mr. shea introduction to programming

17
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming www.MrSheasPage.weebly.co m

Upload: lauren-neal

Post on 18-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

EIGHTH GRADE ROBOTICSKITTATINNY REGIONAL HIGH SCHOOL

MR. SHEAIntroduction to Programming

www.MrSheasPage.weebly.com

Page 2: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Action Tab

Medium Motor

Large Motor (Individual)

Large Motors Steering

Large Motors Tank

Brick Screen Display

Brick Sounds

Brick Button Lights

Page 3: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Move Steering Block

This program block controls two motors at the same time in sync with each other.

Mode selector (first right) let you control the duration that the motors turn.

Block inputs provides the following functions: Steering - steer the way a robot moves Power - speed of the motors (negative = backwards) Number of rotation/degree/second

Controls the duration of motor movement Brake at End

True = Break after the duration set is over. False = Coast at the end

Port selector (right top corner) let you select the ports that motors are connected. Typically Ports B & C

The program above makes a robot move forward, with peed level 50%, for one second.

Page 4: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Move Tank Block

This program block controls two motors separately at the same time. This is a more accurate way of controlling the motion of your robot.

Mode selector (first right) let you control the duration that the motors turn.

Block inputs provides the following functions: Power left - controls the power level of left motor Power right - controls the power level of right motor Number of rotation/degree/second

Controls the duration of motor movement Brake at End

True = break after the duration set is over. False = Coast at the end

Port selector (right top corner) let you select the ports that motors are connected. Typically Ports B & C

The program provided makes a robot spin on the spot for 2 second.

Page 5: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Move Tank Basic Motion - Power

=L R L RL R

L R L RL R

=OPP.=>

OPP. =

Page 6: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

ChallengesAttach a marker to your robot and use a large sheet of paper.

Make your robot draw a big circle. Make your robot draw a triangle. Make your robot draw a rectangle.

Make some shape (You pick the shape! Draw some shapes with difficult turns!)

Page 7: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Large Motor

This block controls two motors separately at the same time.

Mode selector (first right) let you control the duration that the motors turn.

Block inputs provides the following functions: Power left - controls the power level of left motor Power right - controls the power level of right motor Number of rotation/degree/second

Controls the duration of motor movement Brake at End

True = break after the duration set is over. False = Coast at the end

Port selector (right top corner) let you select the ports that motors are connected.

Can be changed to select any port.The program provided makes the motor spin

for 1 rotation at 50% power.

Page 8: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Medium Motor Block

This block controls the medium motor. Mode selector (first right) let you control the duration that the motors turn.

Block inputs provides the following functions: Power - controls the power level of the motor Number of rotation/degree/second

Controls the duration of motor movement Brake at End

True = break after the duration set is over. False = Coast at the end

Port selector (right top corner) let you select the ports that motors are connected. Typically Port A

The program provided makes the motor spin at 50% power for 1 second.

Page 9: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Brick Button Lights

This block controls the lights around the brick buttons.

Mode selector (first right) let you control function of the lightBlock inputs allows you to select the color: Color Selector: 0 = Green, 1 = Orange, or 2 = Red Turn off or leave turned on after command

Page 10: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Brick Display Screen

Displays and image, shapes, or words on the programmable brick’s screen

Page 11: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Brick Display Screen

Page 12: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Brick Sounds Produces a sound file, tone, or note from the

programmable brick.

Page 13: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Flow Control

Start Block

Wait – Time

Loop Interrupter

.

Switch

Loop

Page 14: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Start Block The beginning of a programming block

sequence. More than one can be used at a time.

All Start Blocks begin when program is run

Page 15: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Wait Command

Waits for the amount of time specifies in seconds Time is measured from the start of the Wait Block.

Page 16: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Loop Command Repeats the command or string of

commands inside of it. In unlimited mode, the robot will repeat

the commands forever. Any command blocks to the right of the

loop will never be run.

Page 17: EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming

Switch Command Allows the robot to choose between

two cases (True: & False: ) depending on the input from the chosen sensor