Robot status updates on a website using FTP
Websites provide the most important way to publish information. In robotics robot status information is essential, especially if a large number of robots are used in a factory. A good way to provide robot health information to the operator is by uploading this information to a website. In this lecture you will learn what the file transfer protocol (FTP) is and how to use it to upload text file to a website.
- Lego EV3 with a Touch Sensor
- Ozeki 10 installed: Installed Ozeki 10 Robot OS
- Lego connection installed: Installed Lego Bluetooth connection
- SNAP basics: Basic knowlege of the Snap programming language
Describe what the FTP is!
FTP - File Transfer Protocol is a standard Internet protocol for transmitting files between computers on the Internet over TCP/IP connections.
Figure 1 - FTP Server and clients
Configure an FTP server in Windows!
The following video shows you how to set up and manage an FTP server on Windows 10. FTP server is necessary in order to share files using the File Transfer Protocol. An FTP server is what an FTP client connects to for file transfers. In this case, you can use Windows users for FTP account.
If you would like to use third party FTP server, the following video shows you how to install FileZilla FTP server in Windows.
A file transfer protocol account (FTP account) is a type of user account that enables the transfer of files with a host computer by using FTP services. It is an account that is created for all new FTP users seeking FTP services. It is created and maintained on an FTP server. From the following video you can learn how to create a new FTP user on the FileZilla FTP server.
Test the FTP server using Total Commander!
To test the FTP connection we use Total Commander. In this video, you can see how to connect to the FTP server from Total Commander using the test account and we test the connecton with a file upload.
Setup an FTP client connection in Ozeki 10!
To upload status updates using FTP, first you need to create an FTP client connection.
To create an FTP client connection, you just need to open Control Panel and click on Create new Connection button.
Now you can see all connection methods in Ozeki 10. To create an FTP connection choose Application option then select the FTP icon.
You can type a name for the connection and you need to specify the file format and the encoding options. After it, if you would like you can specify the "Local storage path" and "FTP storage path". In the video we leave it in the defaults. Finally in the FTP connection tab you need to specify the FTP server details: you have to type the machine's IP address and port and enter the username and password of the FTP user account.
Upload a file from SNAP when the Touch Sensor is pressed!
The final task is to create the program of the lecture in Ozeki Snap. In the following video you can see how to create the SNAP program which will upload messages in a file to an FTP server when you press the Touch Sensor on the Lego Robot.
Figure 2 - Program code to upload a file to an FTP server
|Download program code to learn the method of upload a file to an FTP server|
It is easier to follow the guide if you have the codes in front of you:
Download Ozeki Snap code for robot status updates using FTP