Introducing the Humble_rpi-plugin-lirc gem

require 'humble_rpi-plugin-lirc'


class DummyNotifier
  
  def notice(message)
    puts Time.now.to_s + ' - ' + message
  end
  
end

rpi = HumbleRPiPluginLirc.new(settings: {}, variables: {notifier: DummyNotifier.new})
rpi.start

Observed

HumbleRpiPluginLirc ready
2015-06-15 07:46:54 +0100 - pi/lirc: KEY_4 pressed
2015-06-15 07:46:55 +0100 - pi/lirc: KEY_7 pressed
2015-06-15 07:46:57 +0100 - pi/lirc: KEY_8 pressed

Resources