# File lib/nxt.rb, line 64
  def initialize(dev = $DEV)
    @nxt = NXTComm.new(dev)
    
    @motors = {}
    @motors[:a] = Motor.new(@nxt, :a)
    @motors[:b] = Motor.new(@nxt, :b)
    @motors[:c] = Motor.new(@nxt, :c)
    
    @sensors = {}
    @sensors[1] = TouchSensor.new(@nxt, NXTComm::SENSOR_1)
    @sensors[2] = SoundSensor.new(@nxt, NXTComm::SENSOR_2)
    @sensors[3] = LightSensor.new(@nxt, NXTComm::SENSOR_3)
    @sensors[4] = UltrasonicSensor.new(@nxt, NXTComm::SENSOR_4)
    
    @motor_threads = {}
    @sensor_threads = {}
  end