Unit 5 – “Watch Out!”
Introduction New Topics Case Structures New Functions Less? Comparison Function Ultrasonic Sensor
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
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
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)