Robotics
description
Transcript of Robotics
![Page 1: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/1.jpg)
Robotics
Module 1
![Page 2: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/2.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/3.jpg)
Just a minute! Yesterday you
said x equals two
![Page 4: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/4.jpg)
Robotics Applications
• Exploring other planets• Investigating deep-sea volcanoes• Assembling automobiles• Performing surgery
Medicine Dispenser RobotHome Security Robot
![Page 5: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/5.jpg)
Data Hubs
Math Operation
Output (Result)
Input
Numbers
![Page 6: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/7.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/8.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/9.jpg)
Advanced Programming Blocks
![Page 10: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/10.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/11.jpg)
LAB ACTIVITY 1
![Page 12: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/12.jpg)
LAB ACTIVITY 1
![Page 13: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/13.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/14.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/15.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/16.jpg)
File Name
• use meaningful filenames that reflect the actual content of your files.
• The name in the NXT
![Page 17: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/17.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/18.jpg)
LAB ACTIVITY 2
![Page 19: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/19.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/20.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/21.jpg)
Example Text: x Text: y Text: z Text: w
![Page 22: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/22.jpg)
Activity 3
![Page 23: Robotics](https://reader036.fdocuments.net/reader036/viewer/2022062816/568156cd550346895dc46490/html5/thumbnails/23.jpg)
Action: writeName: lightlogType: number
Control: timeUntil: 20
Action: closeName: lightlog
Where is this lightlog located ?