def on_sensor_update(obj=nil, &block)
      @on_sensor_update_obj = obj
      @on_sensor_update = Proc.new { |device, obj_ptr, index, value|
        yield self, @sensors[index], value, object_for(obj_ptr)
      }
      Klass.set_OnSensorUpdate_Handler(@handle, @on_sensor_update, pointer_for(obj))
    end
def on_sensor_update(obj=nil, &block)
      @on_sensor_update_obj = obj
      @on_sensor_update = Proc.new { |device, obj_ptr, index, value|
        yield self, @sensors[index], value, object_for(obj_ptr)
      }
      Klass.set_OnSensorUpdate_Handler(@handle, @on_sensor_update, pointer_for(obj))
    end
Sets a sensor update handler callback function. This is called at a steady rate of 8ms.

 @param [String] obj Object to pass to the callback function. This is optional.
 @param [Proc] Block When the callback is executed, the device and object are yielded to this block.
 @example
     mc.on_sensor_update do |device, sensor, value|
       puts "Analog Sensor #{sensor.index}'s value is #{value}"
     end
 As this runs in it's own thread, be sure that all errors are properly handled or the thread will halt and not fire any more.
 @return [Boolean] returns true or raises an error