230 likes | 372 Views
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
E N D
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 • IAT competency exams (practical and knowledge ) 40 marks
Robotics Applications • Exploring other planets • Investigating deep-sea volcanoes • Assembling automobiles • Performing surgery Medicine Dispenser Robot Home Security Robot
Data Hubs Math Operation Input Numbers Output (Result)
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.
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
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.
LABACTIVITY1 • Suggest an application of the NXT-G code ? • How can you modify the previous program to implement a sound meter? Intensity
File Access Block File Type Action 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.
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.
File Name • use meaningful filenames that reflect the actual content of your files. • The name in the NXT
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.
Create a file in the NXT called Robotics, Action: write Name: Robotics Type: Text Text: explorer Action: close Name: Robotics Action: read Name: Robotics Type: Text What is written inside this file ? Why did you close the robotics file, then open it again? Why did you delete the file in the first place ? How can I overwrite the robotics file ? Action: write Name: Robotics Type: Text Text: pinball Action: Delete Name: Robotics Action: read Name: Robotics Type: Text Action: close Name: Robotics
Find the mistake Action: write Name: example Type: Text Text: xyz Action: read Name: example Type: Text Action: write Name: example Type: Text Text: xyz Action: close Name: example Action: Text Action: read Name: example Type: Text
Example Text: x Text: y Text: w Text: z
Control: time Until: 20 Action: write Name: lightlog Type: number Action: close Name: lightlog Where is this lightlog located ?