Skip to content

jrobertson/shutter3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introducing the Shutter3 gem

Photo of a bluetooth remote control camera shutter

Installation

  • apt-get install bluez-hcidump
  • gem install shutter3

Usage

require 'shutter3'

shutter = Shutter3.new('FF:FF:EF:FE:E0:3A')
shutter.start

Output:

connected to 3A E0 FE EF FF FF
iOS button pressed
android button pressed
3A E0 FE EF FF FF disconnected

Example using a custom class

class BluetoothRemote < Shutter3

  def initialize(bdid)
    super(bdid)
  end

  def on_android_keypress()
    puts 'button 2 pressed'
  end

  def on_android_keydown()

  end

  def on_android_keyup()

  end

  def on_connect()
    puts 'the bluetooth remote is now connected'
  end

  def on_disconnect()
    puts 'the bluetooth remote is now disconnected'
  end

  def on_ios_keypress()
    puts 'button 1 pressed'
  end

  def on_ios_keydown()

  end

  def on_ios_keyup()

  end

end

br = BluetoothRemote.new 'FF:FF:EF:FE:E0:3A'
br.start

Output:

the bluetooth remote is now connected
button 1 pressed
button 2 pressed
the bluetooth remote is now disconnected

Resources

bluetooth shutter control button remote

About

Uses the command `hcidump --raw` (see bluez-hcidump) to detect the bluetooth button events for a wireless bluetooth remote control shutter button.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages