Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit 5 – “Watch Out!”. Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor.

Similar presentations


Presentation on theme: "Unit 5 – “Watch Out!”. Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor."— Presentation transcript:

1 Unit 5 – “Watch Out!”

2 Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor

3 Case Structures Can be placed the same way as a while loop Selector Label contains the list of all cases Default is true and false Case Selector changes what case we are in Case selector must be connected Can write different code in each case

4 Ultrasonic Sensor Allows you to use the ultrasonic sensor on the robot Outputs the distance between the robot and an object Value between 0 – 255 Must specify which port the sensor is connected on the NXT Brick

5 Less? Compares numeric function Checks to see if the top value is less then the bottom value Outputs a Boolean value True if it is less False if it is greater (or equal to)


Download ppt "Unit 5 – “Watch Out!”. Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor."

Similar presentations


Ads by Google