atitan / mfrc522_ruby Goto Github PK
View Code? Open in Web Editor NEWMFRC522 RFID Reader Library for Raspberry Pi
License: MIT License
MFRC522 RFID Reader Library for Raspberry Pi
License: MIT License
I'm trying to use mfrc522 with gtk3 on an RPi 3B+ with raspbian stretch. Code is
require 'gtk3'
require 'mfrc522'
win = Gtk::Window.new
win.window_position = :center
win.border_width = 5
win.signal_connect("destroy") { Gtk.main_quit }
rfid = MFRC522.new
win.show_all
Gtk.main
If I comment rfid = MFRC522.new
gtk window is displayed. If I uncomment, execution blocks on rfid = MFRC522.new
mfrc522
code on console (without gtk) to read uid works well
Do you happen to have an example project using AES encryption with Desfire cards?
Sometimes I got following error when reading a card
mfrc522-1.0.4/lib/mfrc522.rb:259:in `^': nil can't be coerced into Fixnum (TypeError)
Maybe there should be a error handler to handle this issue?
Not sure if this project is still active, stuck how to troubleshoot timeout error.
Setup is working with python code and setup
I did figure out to update nrstpd
to 25 based on above setup.
Error I am seeing when running
require 'mfrc522'
require 'securerandom'
r = MFRC522.new(25)
begin
r.picc_request(MFRC522::PICC_REQA)
uid, sak = r.picc_select
puts "uid: #{uid}"
rescue CommunicationError => e
abort "Error communicating PICC: #{e.message}"
end
Error communicating PICC: status_picc_timeout
Thank you for making this library!
I am working on PN532 but it is very useful.
Hello, my connections are:
MFRC522 physical RPI3 pin
sda 24
sck 23
mosi 19
miso 21
irq not connected
gnd 6
rst 18
3.3V 1
and my test script:
require 'mfrc522'
r = MFRC522.new
print(r.picc_request(MFRC522::PICC_REQA)) # returns true
uid, sak = r.picc_select # always raises UnexpectedDataError
However, it works well with pi-rc522 (python), changing connections
irq 18
rst 22
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.