The sketches you upload through the Arduino IDE are stored in the Edison and they start running each time the Edison boots, so there is no need to run them manually from the terminal.
On the other hand, you can write scripts directly in the terminal using the Vi text editor. This way allows you to write Python or C/C++ scripts. For example to create a Python script you should do the following:
1. Create the script: You have to create a .py file, which is the Python script. You can write it using the Vi text editor. The Vi text editor can be opened with the following command:
You will enter into the Vi environment so you can start writing your script. I recommend you to check the following site to get more details about the Vi text editor: A Beginner’s Guide to Editing Text Files With Vi
2. Run the script: Once you have your script ready, you can run it with the following command:
That is what you have to do to create and run Python scripts. In case of C/C++ the process is a little different. As you may know, Python is an interpreter so you can run Python scripts using the way I described above; however in C/C++ you have to compile the script before you can run it. For C/C++ scripts you have to do the following:
1. Create the script: Just like in the previous description, you can use Vi to write the .c or .cpp file.
2. Compile the script: Once the .c (.cpp) file is ready you have to compile it. In order to compile a C/C++ script you can use the following command for each case:
- For C scripts: gcc <script_name.c> -o script_name
- For C++ scripts: g++ <script_name.cpp> -o script_name
3. Run the program: Once the script is compiled you can run the program with the following command:
I hope this information has answered your question. Additionally, I recommend you to check the following site to find some Python examples for Edison: MakersTeam/Edison · GitHub. You might find them helpful to start creating your own scripts.
Thanks a lot @DiegoV_Intel, You gave me description more than i had expected.
I really appreciate your effort!!