Project

shutter3

0.0
No commit activity in last 3 years
No release in over 3 years
Uses the command `hcidump --raw` (see bluez-hcidump) to detect the bluetooth button events for a wireless bluetooth remote control shutter button.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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