Class: Artoo::Commands::Scan

Inherits:
Artoo::Commands show all
Defined in:
lib/artoo/commands/scan.rb

Instance Method Summary collapse

Instance Method Details

#bluetoothObject



32
33
34
35
36
37
38
39
# File 'lib/artoo/commands/scan.rb', line 32

def bluetooth
  case os
  when :linux
    run("hcitool scan")
  else
    say "OS not yet supported..."
  end
end

#serialObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/artoo/commands/scan.rb', line 10

def serial
  case os
  when :linux
    run("ls /dev/tty*")
  when :macosx
    run("ls /dev/{tty,cu}.*")
  else
    say("OS not yet supported...")
  end
end

#usbObject



22
23
24
25
26
27
28
29
# File 'lib/artoo/commands/scan.rb', line 22

def usb
  case os
  when :linux
    run("lsusb")
  else
    say "OS not yet supported..."
  end
end