I created a database table with MS Access and connected with Visual studio and I want to know if it's possible if Arduino can retrieve the data in Access table and use it in it's variable. Can I do this with MS access or need Mysql database ?
An Arduino cannot do anything with data while it is in files on your PC. You need a program running on the PC to gather the data and pass it to the Arduino.
As far as receiving the data on the Arduino is concerned have a look at the examples in Serial Input Basics - simple reliable ways to receive data.
Your PC application can read (and write) the Access database.
Your PC application can read and write a serial port.
So you can e.g. send a command from the Arduino to the PC application like <r,1> to read the first record or <r, arduino> to get all records containing arduino.
The PC application will query the Access database and return the requested record(s) to the Arduino via the serial port.
PS
Command format based on the link that Robin posted in reply #1
So you can e.g. send a command from the Arduino to the PC application like <r,1> to read the first record or <r, arduino> to get all records containing arduino.
Could you guide me with example which I can understand it.
because in my case like this:
I have 3 RFID cards for dogs and cat for feeding. and I made a windows Application form with MS access db to create a table contain : " Dog name, RFID Tag number per each dog, the food amount, and the time with date" so when dog come to feeder the feeder will read the tag and know if the dog's time for feeding will serve him his food amount and type.
So I want Arduino to check the RFID tag with date/time to look into table and see if match open the servo to serve if not will not open.
MKSaeed:
So I want Arduino to check the RFID tag with date/time to look into table and see if match open the servo to serve if not will not open.
How to write a program for your PC is outside the scope of this Forum but there are probably hundreds of online tutorials on other websites that will help you to learn.
To do what you want your Arduino needs to read the RFID tag and then send a message to your PC program containing the details from the RFID tag. After that the PC program will compare the details with those in the database and send a message back to the Arduino telling it whether there was a match.
Yes I know the the pc program is not here I already made the program using VB and MS Access for Database. but I want to know how to send the order to open servo connected with Arduino.
Thank you again for give me an Idea...that I will work now on let the PC program decide and send order to Arduino instead of make Arduino decide!
It's a long time since I used Windows so I have no advice to offer about Windows-specific programming.
This Python - Arduino demo illustrates both sides of the communication. It should not be difficult to adapt the concepts to your favourite programming language.
Alternatively, if you want to use Python my example should work on Windows with appropriate adjustment to the serial port references.
MKSaeed:
you mean that I need to use python with Windows program to be able to send serial/Ethernet signal to Arduino? Can not do it directly from VB script ?
No.
If you read Reply #7 carefully you will see that I wrote "It should not be difficult to adapt the concepts to your favourite programming language."
MKSaeed:
I have 3 RFID cards for dogs and cat for feeding. and I made a windows Application form with MS access db to create a table contain : " Dog name, RFID Tag number per each dog, the food amount, and the time with date" so when dog come to feeder the feeder will read the tag and know if the dog's time for feeding will serve him his food amount and type.
I think a database is overkill for a table with three rows of a couple of values,
which could easily fit into the onboard EEPROM.