# File lib/commands/ultrasonic_sensor.rb, line 69
  def set_mode
    @nxt.set_input_mode(
      NXTComm.const_get("SENSOR_#{@port}"),
      NXTComm::LOWSPEED_9V,
      NXTComm::RAWMODE
    )
    # clear buffer
    @nxt.ls_read(NXTComm.const_get("SENSOR_#{@port}"))
    # set sensor to continuously send pings
    @nxt.ls_write(NXTComm.const_get("SENSOR_#{@port}"), [0x03, 0x00, 0x02, 0x41, 0x02])
  end