castor bot. now, we will begin creating a robot log onto your computer on your screen, click on the...

29
Castor Bot

Upload: gavin-benjamin-richard

Post on 17-Jan-2016

233 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Castor Bot

Page 2: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Now, we will begin creating a robot

Log onto your computer On your screen, click on the website labeled

“castor bot” Your building instructions will be found there Raise your hand if you need any help

Page 3: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Now, that everyone has created a robot...

Please open your NXT program Click “new program”

Page 4: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

We will now go through the basics on programming your robot

Page 5: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

How to program your robot

Page 6: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Creating a new program…

•You can create a new program or open a program you previously created.

•Once you have a name for your program, select go!

Page 7: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

You should get a screen like this.

Page 8: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Your work area• The Left bar is for putting blocks on your program

• There are many different blocks, but we will go over the most basic ones first.

• In the middle is our area where we do our programming.• We drag items onto the tracks.

Page 9: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Please drag the movement block onto the track

Page 10: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Using the Motion block

•Has many parts.–The active ports.–Power–Direction: can be set to forward, reverse or stop.–Duration: controlled by:

•Rotation•Degrees•Time

–Steering: can adjust how hard a turn–Brake or coast modes.

Page 11: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

PortsWhat are ports?

• Cables connecting brain to components

A, B, C

• Used for controlling motors

1,2,3,4

• Used for connect to the sensors

• We will learn more about these later

Page 12: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Changing ports and power

•Depending on how many active motors you have connected, we check/uncheck Ports A, B, and/or C.•Power effects the speed of the motors.

Page 13: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Controlling Direction

What is it to control direction?

Dragging the arrow left/right changes the direction that the robot will move.

This feature is only active when two motors are selected.

It controls forward, backward, or stop.

How will changing the power effect the steering?

Page 14: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Duration of activity

Duration effects how long the block is active.

Types of Duration

Degrees

Unlimited

Time

Rotation

Let’s investigate!!

Page 15: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Lego MindStorm

An Introduction to programming

Page 16: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Blocks

Blocks are used to give instructions to your robot.

There are many types of blocks

You can use the blocks that come with the NXT software.

You can create your own blocks.

Page 17: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Common Blocks

The common blocks:

Page 18: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Common Blocks

Move

Tells your robot to move.

Record Play

The record play block allows your robot to record itself (movements and sound) and replay its actions later in the program.

Page 19: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Common Blocks cont.

Sound

Allows your robot to play a sound file.

Display

Displays an image on the NXT brick screen.

Page 20: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Flow Blocks

The Flow Blocks

Page 21: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Flow Blocks

The Loop Block

Use the loop block if you want your robot to continue doing the same things again and again, such as moving forward and backward until a touch sensor is pressed.

Page 22: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Flow Blocks

The Switch Block

The switch block enables the robot to make its own decisions, such as going left when it hears a loud sound and turning right when it hears a soft sound.

Page 23: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Flow Blocks

The Wait Blocks

The wait block makes your robot wait for sensor input, such as a sound or a time interval.

Distance Light Sound Time Touch

Page 24: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Action Blocks

The Action Blocks

Page 25: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Action Blocks

Display

The display block enables you to control the display on the NXT brick. You can type, show icons or even draw through your program!

Page 26: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Action Blocks

Lamp

The lamp block tells your robot when to turn the lamp on/off. You can program your robot to turn on its lights when the touch sensor is triggered, or when it becomes dark.

Page 27: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Action Blocks

Message Send

The message send block tells your robot to send information to another robot or to your computer.

Page 28: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Action Blocks

Motor

The motor block tells your robot to turn on a motor.

This is different from the move block.

Your robot may have multiple motors attached.

Page 29: Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions

Now let us move onto building the Bumper Car