Crea sito

upload files



This example was realized using the AVIL shell sketch and uncommenting the the directive #define ETH_IO in compopt.h (see Configurations).
The purpose of this example is to show how to remotely upload a file from your PC (linux or windows using cgwin ) to your Arduino.

As first step i created an example file on my PC ("foo") and if wrote some text in it:

As second step I created this bash script ./uploadToAVIL.sh (remember to set it as executable to run it!).
Open it with a text editor to configure ip address and port of your arduino:

This script automatically open a telnet connection to Arduino and execute an AVIL program that simply wraps the frec function.
As third step run the script from a terminal passing as arguments the name of the local file i want to upload.

If you then connect to your Arduino via telnet and run the "ls" program you'll see the "foo" file just uploaded:

To check if it was correctly uploaded we can print its content like this: