|
|
| Can the NXT rotation sensor sense negative and positive rotation (counterclockwise and clockwise)? |
| (66 ) |
78%
21%
|
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
|