This project will develop software that will take patient readings from sensors and send them to the main clinic where doctors can see the data and analyze patient health remotely. We will be accomplishing this using the FTP protocol and C#.
- Visual studio 2015 IDE
- FTP Server
Connect a push button to Arduino UNO pin number 7. Make it pull up and detect if the button is pressed low.
The software collects the data from sensor and user inputs and then sends them the remote FTP files where a doctor can examine the details. Collecting the patient data is done using serial communication from Arduino, and sending the data to the FTP server is done using the FTP protocol.
In the background, data transfer and storing are done inside Excel files.
How it works
- Starting the software:
While opening the software, first enter the following details.
Username: The particular username for the nursing staff
Password: The password for the username above
Clinic name: The name of the clinic at which the data needs to be saved. It is the remote location where the FTP file will be saved.
Device port: Port number of the temperature detection unit
Server address: It is the web address for the FTP server at which the files are stored.
- Downloading the FTP file:
If all the details are correct, the software will open, and the FTP file for that specific clinic will be downloaded to the local storage.
- Taking the details from patient
Now the software user can detail from the patient, press the button connected to the Arduino, and it will take a reading from the sensor and write in the details section automatically.
- Submitting the details to FTP server
When we press the “send to doctor” button, the details are sent to the FTP server and saved there so the doctor can see the details by using username “Sadmin” and password ‘123”.
- Seeing the entries
Once the data is there, the doctor from anywhere can type the credentials and see the data present there.
Understanding the source code
The source code can be understood in some points.
There are three forms in the project. Their description is given below.
(please see/download the complete software files attached at the end of the article)
It handles the login into the system and checks for the usernames and passwords. Also, in the background, it downloads the FTP file to the local storage to be accessed through the software.
Downloading the FTP file is done inside the function DownloadFTP function called from FTP function. If all the details are correct, it opens the homepage.
Taking the data from the Arduino UNO and sensor is done over serial communication.
Inside a callback function which gets active when any data is received at the serial port, we check for the data if it contains “temp:” then we accept the data and then store it in the software.
Data is stored inside an Excel file in this format
This form is used to show data stored on remote files, which is only accessible to the doctor. It uses an OleDDb connector which is used to extract data from database and excel file storage.
The data is then displayed inside a form in grid view style.
So, this is how we can use FTP communication to make a patient’s health register and use it in real life.
You may also like:
Filed Under: Electronic Projects