Top Banner
Robotics Module 1
23

Robotics

Mar 21, 2016

Download

Documents

Shaun

Robotics. Module 1. Grading policy. Participation 10 marks Preparation, Promptness, Level of Engagement, Behavior HWs 10 marks 2 HWs Quizzes 10 marks 2 quizzes & SWQ Practical 30 marks Lab activities and Practical exam - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Robotics

Robotics

Module 1

Page 2: Robotics

Grading policy • Participation 10 marks

– Preparation, Promptness, Level of Engagement, Behavior• HWs 10 marks

– 2 HWs• Quizzes 10 marks

– 2 quizzes & SWQ• Practical 30 marks

– Lab activities and Practical exam • IAT competency exams (practical and knowledge ) 40

marks

Page 3: Robotics

Just a minute! Yesterday you

said x equals two

Page 4: Robotics

Robotics Applications

• Exploring other planets• Investigating deep-sea volcanoes• Assembling automobiles• Performing surgery

Medicine Dispenser RobotHome Security Robot

Page 5: Robotics

Data Hubs

Math Operation

Output (Result)

Input

Numbers

Page 6: Robotics

Data Type

• To create valid data wire connections between two programming blocks, you must draw a data wire from one block’s output plug to the other block’s input plug.

• The two plugs must support the same data type.

• Data types include numbers, text and logic data.

Page 7: Robotics

Data Wires

• Data wires are color-coded as follows:– Green data wires pass logic data ex. (0 and 1)– Yellow wires pass numeric data ex.

(1,2,3,..1.2,3.14)– Orange wires pass text ex. (a,b,c,chair,…..)– grey wires/broken wires: faulty connections

Page 8: Robotics

Broken data wire

• Data wires breaks for– Missing input - Occurs when a data wire is attached

to an originating programming block that has no input source.

– Too many inputs – Occurs when an input plug is configured to receive data from more than one input plug.

– Data type mismatch – Occurs when you attempt to connect a data wire between two incompatible data plug types.

Page 9: Robotics

Advanced Programming Blocks

Page 10: Robotics

Number to Text Block converts a numeric value to its equivalent text data.

Text Block join together up to three pieces of text

Keep Alive Block prevent the NXT from turning itself off.

The File Access Block create your own files on the NXT, which you can use to store any data that your programs use. The information you store in a file is persistent

The Calibrate Block calibrate light and sound sensors by adjusting the minimum and maximum values of the sensor.

Reset Motors Block resets the adjustment value of the motor to zero.

Bluetooth Connection Block

establish a connection with another Bluetooth device, such as NXT brick.

Page 11: Robotics

LAB ACTIVITY 1

Page 12: Robotics

LAB ACTIVITY 1

Page 13: Robotics

LAB ACTIVITY 1

•Suggest an application of the NXT-G code ?

•How can you modify the previous program to implement a sound meter?

Intensity

Page 14: Robotics

File Access Block

ActionFile Type

The File Access block allows you to create your own files on the NXT. Such files can be used to store any data that your programs use. For Example, you can store the values of the sensors to analyze and process them.

Page 15: Robotics

Action

• Write: Stores information in a file. If the file doesn’t exist, the access block will create one; otherwise, the new data is added on at the end of the existing file.

• Read: Retrieves information from a file.• Delete:• Close: Closes the file. You need to close the file

before you can read from, write to or delete it.

Page 16: Robotics

File Name

• use meaningful filenames that reflect the actual content of your files.

• The name in the NXT

Page 17: Robotics

Type

• File type setting tells the block which data type you are using.

• The file access block can read and write both numbers and text values.

Page 18: Robotics

LAB ACTIVITY 2

Page 19: Robotics

Action: writeName: RoboticsType: TextText: explorer

Action: closeName: Robotics Action: read

Name: RoboticsType: Text

Create a file in the NXT called Robotics,

What is written inside this file ?

Why did you close the robotics file,

then open it again?

How can I overwrite the robotics file ?

Action: Delete Name: Robotics

Action: writeName: RoboticsType: TextText: pinball

Action: closeName: Robotics

Action: readName: RoboticsType: Text

Why did you delete the file in the first place ?

Page 20: Robotics

Find the mistake

Action: writeName: exampleType: TextText: xyz

Action: readName: exampleType: Text

Action: writeName: exampleType: TextText: xyz

Action: closeName: example

Action: readName: exampleType: Text

Action: Text

Page 21: Robotics

Example Text: x Text: y Text: z Text: w

Page 22: Robotics

Activity 3

Page 23: Robotics

Action: writeName: lightlogType: number

Control: timeUntil: 20

Action: closeName: lightlog

Where is this lightlog located ?