I would like make an access control device, and i like to have your opinion before start on the following Points:
The device must connect to a postgresql database in the network, and it must connect also to a local database "i.e sqlite".
1- I must use a Yun or Galileo card for their linux part ?, to be able to connecting directly to the databases.
If so is it possible to make a final prototype from these cards "Yun, galileo" ? in other words it will be easy for a beginner user to make it ?
2- After the creation of the final prototype, i can :
2.1- use arduino ide for updating the internal program.
2.2- Add some pin connection, more powerful CPU; more flash memory, EPROM ...
For your informations the device must have these spec.:
5x UART communication.
1x LCD display 20x2
1x LCD display monochrome
6x Pushbutton
2x Led Matrix 16x8
1x Buzzer
1x Relay
1x USB for data exporting
I know, it's too many questions, but they will really make me move forward.
The Yun does not normally have a spare USART. You will need another board for that - and a Mega has only 3 spare USARTs (assuming the first (of 4) is used for programming and debugging)
I wonder if a RaspberryPi combined with one or more Arduinos would be more suitable?
UART links it's some RFID readers, biometric and printer.
supposedly i want to have only 3 UART for programming, and use Mega card, it is possible to connect directly to a database without the linux part ?
generally it is not exist an upgrading board for UART extension ?
You possibly could connect to the network that has the database using an Ethernet shield or an ESP2866 WiFi module. But IMHO it would be much simpler to do that stuff in Python. That's why I suggested an RPi might be appropriate - together with the Mega.
You can get external UARTs that connect using SPI. When I last looked the cheapest way to make that happen seemed to be an Atmega 328.
I respect your opinion of course, but my goal is be able to create my own electronic card and I became familiar with Arduino IDE, if i decide to use Rasp it will not be possible for me for reproducing the card.
so In short :
The multi-uart looks like it would solve the first issue.
Would it be cheaper / less trouble than 4 Atmega 328s?
You should have no trouble communicating using SPI on the Yun.
IMHO the second issue (communicating with the network database) will be much easier using a "PC" that can run Python rather than trying to shoehorn the equivalent code into, say, an Arduino Mega.
The Linux side of the Yun can run Python and the Yun plus the UARTs over SPI may be a better option than an RPi plus a Mega.
However it may be possible to do the whole thing on a Mega plus some SPI-UARTs.
Mega with some spi uart it's possible to connect to the network database without linux ? Because i tested the php script solution but it's not very clean and pro ;), right ?
kiman26:
Mega with some spi uart it's possible to connect to the network database without linux ? Because i tested the php script solution but it's not very clean and pro ;), right ?
You are not providing nearly enough information from which to give a reasonable answer.
PHP has nothing to do with a Mega.
How do you plan to connect to the network?
What transactions do you want to perform on the database?
My database server is a postgresql, for connecting to it from an arduino, I must use an ethernet shield and according to me with linux system and python scripts, OR with a php script on the server that we call it from the arduino card, I followed this video
Are you planning to use the program code that is linked to in the YouTube page?
You have not said what transactions you want to perform on the database. Or, put another way, what messages does the Arduino need to send to the network and what data will it expect to receive in return?
Are you planning to use the program code that is linked to in the YouTube page?
No, because it's the only way that I found now
You have not said what transactions you want to perform on the database. Or, put another way, what messages does the Arduino need to send to the network and what data will it expect to receive in return?
The transactions are requests SELECT and INSERT INTO ...
After reading the rfid card i must check the UID in the CARDS table, and after write the pass time in LOG table. "that is the simple way"
kiman26:
The transactions are requests SELECT and INSERT INTO ...
The reason I asked about the transactions is to find out if they are very complex (thus being easier in Python) but they seem not to be. But, actually, that is probably not very relevant.
If you use a Mega and an Ethernet shield you won't be able to access the database directly (AFAIK). The Mega can make a request to a server running on the PC and the server program will need to access the database.
The same will be true if you use a Yun or an RPi unless the database also runs on the Yun or RPi.
The concept in my mind is like this
database ---- web server ---- network ----- Mega (or Yun or RPi) ---- SPI-UART device --- serial devices
it's the same principle of php script in the webserver "Youtube video", I just do not think the concept is really clean and professional for me.
the thing which makes me doubt for the method is that the device must run in two mode:
1 - online with a central database on network.
2 - Standalone with a local database in the device.
I really hesitate for taking the decision and start the programming, so if you have some ideas please do not hesitate.
I am very sorry it's not my intention, the prove that I have already commance with programming with this concept #11;
but that's to have another your opinion on best method. i.e "linux with python scripts"
That image is certainly helpful. However it has an enormous amount of duplication on the 2 sides. For most of it you only need one side. I think the only part that needs to be specific are the diamonds that connect to the remote or local database. After the connection is made the one set of code should work.
However I can't really relate the diagram to the earlier part of this Thread which was concerning itself with a lower level of detail - such as how you actually connect to the database and how you connect to the sensors using the UARTs
I don't think you have ever told us what will be communicating over the UARTs.
That image is certainly helpful. However it has an enormous amount of duplication on the 2 sides. For most of it you only need one side. I think the only part that needs to be specific are the diamonds that connect to the remote or local database. After the connection is made the one set of code should work.
Yes you have right IF I found a solution for connecting directly to a database, with database server "localhost" and "remotehost", but in my case
if this database is local the only solution is using Yun with linux part for to be able to run an local database server ? "That is what I want to ask"
However I can't really relate the diagram to the earlier part of this Thread which was concerning itself with a lower level of detail - such as how you actually connect to the database and how you connect to the sensors using the UARTs