There are four pulse sensors, connected to a special receiver which converts pulses to a serial interface data. Each sensor gives the data to RS232 interface every 12 seconds. Since there are four sensors, data in to RS232 interface comes every 3 seconds. From each sensor data is being transmitted consistently: first data are from the first sensor (1> 15), after 3 seconds comes data from the second sensor (2> 12), then after 3 seconds comes data from third sensor (3> 18) and lastly after 3 seconds comes data from the fourth sensor (4> 24). This cycle is being repeated until forced communication break fro RS232 interface. Example of the data being received on RS232 interface:
1) Retrieve the data every 3 seconds from the RS232 serial interface;
2) Recognize from which sensor the data comes and remove the beginnings of „1>“, „2>“, „3>“ or „4>“ (leave only pulse counts);
3) If the data received from a first sensor, record it to an array 1, from the second sensor record data to an array 2 and so on. Each array must have 2 columns: first for the pulse value (without „1>“, „2>“..) and the second column should be filled with time tag as „date YYYY:MM:DD time: HH:MM:SS“.
4) When the array has more than 30 entries, then connect to MySQL database DB1 and write recorded data from the array to a table1. The table consist of the 4 columns: ID, pulse value, date_time, timestamp. Also at the same time array of data has to be written into the file /user/admin/documents/1_values. The file data must be separated by „ ; “. If connection to a MySQL database fails, then prolong the array to 100 entries, but at the same each recording time trying to connect MySQL database. If after 100 entries in the array connect to the MySQL data isn‘t established, then write the data to a file „1_values“ only. Accordingly, the data from the sensors 2,3 and 4 has to be written to a tables table2, table3, table4 and files „2_values“, „3_values“, „4_values“.
5) The cycle is turning as long as notice of termination (3, 5 months).
Possible solutions for improvement:
As the data will be transmitted via GPRS, tryiing to save transmission bandwidth and costs available arrays with different amount of entries, also different MySQL database recording algorithms.
13 freelancer bu iş için ortalamada 223$ teklif veriyor
We can implement the job well. We would like to know operating system for which the solution and preferred programming language. We are experts with embedded linux like openWRT. We can not go lower than this.
Good day Sir. We have twelve years of experience with low-level/hardware programming. We are experts in the Assembly/C language, and hardware interaction. We'd be honored if you choose us for your fascinating project.
This is fairly simple and is similar to something I have recently done for a large public art install. I am confident that this can be done rather quickly.