Class Commands::RotationSensor
In: lib/commands/rotation_sensor.rb
Parent: Object

Implements the "Rotation Sensor" block in NXT-G (using an nxt motor as rotation sensor)

Methods

degrees   direction   logic   method_missing   new   reset  

Attributes

comparison  [RW] 
port  [RW] 
trigger_direction  [RW] 
trigger_point  [RW] 

Public Class methods

Public Instance methods

returns the number of degrees moved since last reset point

attempts to determine direction based on last time position was requested (may not be accurate)

returns true or false based on comparison type and difference between last time reset point

attempt to return the output_state requested

resets the value_scaled property, use this to reset the degrees counter

[Validate]