LEGO Engineering

| | | | | | | |
Can the NXT rotation sensor sense negative and positive rotation (counterclockwise and clockwise)?


19th of April, 2010

(66 )
78% thumbs up 21% thumbs down

In other words: "the NXT-G Software doesn’t allow me to display negative numbers when I use the Rotation Sensor; what can I do about it?"

The 'Switch' block can be used to check if the rotation sensor has turned past a specified position in a specified direction. Specifying below zero degrees in the Compare section will separate the negative from the positive angles.



In this example, the switch block checks if the rotation sensor is turned below zero degrees. If it is (true, or check mark), the screen will display the text “negative”; otherwise, it will display “positive”. This program also displays the angle, in degrees, of the rotation sensor.





SES
   :
   :
* :
* :
 


Home | About Us | Contact Us

© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.