Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created August 9, 2009 20:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tenderlove/164896 to your computer and use it in GitHub Desktop.
Save tenderlove/164896 to your computer and use it in GitHub Desktop.
require 'nfc'
tags = {
"04823691212580" => "Fitter, happier, more productive",
"04673391212580" => "comfortable",
"04C33091212580" => "not drinking too much",
"04C92C91212580" => "regular exercise at the gym",
"04F15D91212580" => "three days a week",
"041C9F91212581" => "getting on better with your associate employee contemporaries",
"04D79A91212580" => "at ease",
"04933791212580" => "eating well",
"047EEA51962280" => "no more microwave dinners and saturated fats",
"0409A691212581" => "a patient better driver",
}
trap('INT') {
NFC.instance.device.disconnect
exit
}
loop do
NFC.instance.find do |tag|
p tag.to_s => tags[tag.to_s]
system("say #{tags[tag.to_s]}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment