Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.