2

can you please assist me on python scripts that can import DATA FROM AN RFID READER (MFRC522) TO A MariDB DATABASE using a Raspberry Pi 3 B+?

Ak282616
  • 29
  • 1
  • 1
    Please explain what you have tried so far and what did not work. This is not a do my homework site. – joan May 22 '20 at 08:13
  • 1
    I am new to the python world and tried my best to write the data to the RFID tag using the MFRC522 module and raspberry pi. However regarding importing of data to the Mariadb database led me to struggle alot so that's why I am requesting for someone's help over here! – Ak282616 May 22 '20 at 08:58
  • 1
    What error message do you get? – Ingo May 22 '20 at 10:20
  • Ah, let me see. So your homework assignment is in two part: Part 1: read data from MIFARE 1k Classic Card, Part2: import read card data into MariDB. I f you have not comopleted first part, you might like to read the following to get a tip: (1) How can Rpi SPI python read the MFRC522 NFC module? https://raspberrypi.stackexchange.com/questions/109773/how-can-rpi-spi-python-read-the-mfrc522-nfc-module. – tlfong01 May 22 '20 at 11:01
  • But if you have already finished Part 1, then you can edit your question focusing on second part, say, you already got the Classic 1K data and wish to know (a) How to decode the RFID data into a student record or banking transaction, (b) how to import the student records in the data base. If you already know how to import text or CSV stuff into MariDB, then the only problem remained is decoding Classic 1K. Please let me know if I misunderstood you teacher's assignment. :) Cheers. – tlfong01 May 22 '20 at 11:06
  • 1
    Please read https://stackoverflow.blog/2010/09/29/good-subjective-bad-subjective/ then edit your question to give more details of what you've tried, what works, what fails and what you don't understand about the failures. – Dougie May 22 '20 at 15:48

1 Answers1

2

The answer for your question can't be given that easily. But here, let me try. Follow this flow.

  1. Install and configure MariaDB
  2. Install python framework that gives you the connectivity with the database.
  3. Use pigpio with python and write a program to capture the readings and use the database library to save the data. Last thing , you have to find the SPI pins from specs of RPi. This way you can connect the whole thing togather.

Ask anything if you are stuck.

Sohan Arafat
  • 1,828
  • 1
  • 10
  • 40