Created
          November 6, 2014 10:12 
        
      - 
      
- 
        Save anonoz/b80d118403e17bb76627 to your computer and use it in GitHub Desktop. 
    Code to scan MMU card's UID, return the serial number
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require 'nfc' | |
| # Read | |
| c = NFC::Context.new | |
| d = c.open nil | |
| puts "Put your card..." | |
| e = d.select | |
| # UID | |
| uid = e.uid.collect! { |x| x.to_s(16) }.reverse!.join.to_i(16) | |
| puts uid | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment