No commit activity in last 3 years
No release in over 3 years
A humble_rpi plugin for reading NFC RFID tags (using the ruby-nfc gem) and publishing the identifier to the messaging broker
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.3, ~> 1.3
 Project Readme

Introducing the Humble RPi plugin NFC gem

Testing the plugin

require 'humble_rpi-plugin-nfc'


class Echo

  def notice(s)
    puts "%s: %s" % [Time.now, s]
  end
end


nfc = HumbleRPiPluginNFC.new(variables: {notifier: Echo.new})
nfc.start

Output:

ready to detect RFID tags
2016-02-09 00:46:37 +0000: pi/nfc: detected 9d424e7c Mifare Classic 1k SAK: 0x8
2016-02-09 00:47:04 +0000: pi/nfc: detected 9d424e7c Mifare Classic 1k SAK: 0x8

Running the plugin from the HumbleRPi gem

require 'humble_rpi'
require 'humble_rpi-plugin-nfc'

r = HumbleRPi.new device_name: 'ottavia', sps_address: '192.168.4.140',\
  plugins: {NFC: {} }
r.start

Resources

humblerpi nfc rfid gem plugin