send rfid data to Mysql

Asked

Viewed 541 times

0

How do I make sure that when the tag goes through the rfid reader the following information is sent to the mysql database: "Salvador", "Bahia" ?

  • How far have you been? Can you access the sensor? You already have a database configured?

  • I’m starting on the subject now and would like to know if it would be possible or if it is too complicated to perform this operation? ja have a bank yes.

  • So, possible is so much they do. You having a connection with the Arduino can get data from it and include in the database without problems

  • It would be like passing an example of code so that I can base myself?

  • So, just look for examples on American sites like this: http://playground.arduino.cc/Main/DIYRFIDReader . And then fetch the C++ connector for Mysql: https://dev.mysql.com/doc/connector-cpp/en/

1 answer

2


There are several possible scenarios.

  • Establish a TCP/IP connection directly from MCU to Mysql and run SQL commands directly. This will cost a lot of flash memory and Ram.
  • Connect the MCU serially or via USB to a python service, for example, which will receive the data and execute the SQL commands to insert the data. Quick and cheap solution.
  • Use some macro directly in some database that supports this that accepts data in JSON or XML format and connect the MCU via TCP/IP directly to this 'service'. This avoids having to program a BD drive.

In all cases you will have to learn how to use SQL or some Wrapper.

  • What would be MCU?

  • Microcontroller

  • I explain more about the second option. Could it be? with the usb cable on the Arduino I can send an Insert to the bank?

  • http://www.instructables.com/id/Interface-Arduino-to-MySQL-using-Python/step4/Python-TIEM/ Even if you don’t know English, just take the code and study it. This python code ai does everything you want. Adapt to your need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.