def init(options = {})
      return if @initialized_hardware

      defaults = {
        device: ENV["SMALRUBOT_DEVICE"] || nil,
        baud: 19_200,
      }
      opt = Util.process_options(options, defaults)

      txrx = Smalrubot::TxRx.new(opt)
      begin
        world.board = Smalrubot::Board.new(txrx)
        @initialized_hardware = true
      rescue Exception
        Util.print_exception($!)
        @failed_init_hardware = true
      end
    end
def init(options = {})
      return if @initialized_hardware

      defaults = {
        device: ENV["SMALRUBOT_DEVICE"] || nil,
        baud: 19_200,
      }
      opt = Util.process_options(options, defaults)

      txrx = Smalrubot::TxRx.new(opt)
      begin
        world.board = Smalrubot::Board.new(txrx)
        @initialized_hardware = true
      rescue Exception
        Util.print_exception($!)
        @failed_init_hardware = true
      end
    end
ハードウェアを準備する

 @param [Hash] options オプション
 @option options [String] :device シリアルポートのデバイス名。
   WindowsだとCOM1など