PPTX - Intel Software Academic Program

advertisement

Internet of Things with Intel Edison

Compiling and running

Pierre Collet

www.Intel-Software-Academic-Program.com

paul.guermonprez@intel.com

Intel Software

2014-10-14

Hello world !

Compiling and running

We assume

You have configured you Edison according to the previous slides.

You are connected via SSH or Serial port over USB to the Edison board.

You have downloaded the code samples from : http://www.intel-software-academic-program.com/pages/courses#edison

Our Goal

Transfer the code examples to the Edison board.

Run some basics code to check that everything is all right.

Transfer from Linux

Transfer from Linux

# scp –r file_path root@192.168.xxx.xxx:~/

Replace file_path by the path of the file you want to send

Replace 192.168.xxx.xxx by the ip of the Edison board.

Replace ~/ by the path on the board where you want to copy the files

(~/ is the home folder.)

Transfer from Windows

Transfer from Windows

Download and install WinSCP : http://winscp.net/eng/download.php

Select SCP in file protocol

Enter the board ip

Let 22 as port number

Enter “root” as username and your password in the password field.

Click login.

Filezilla is also a popular choice.

Running

Unpack, change directory

Once you have transferred and unzipped the example codes on your Edison board, go to the directory “labs/helloall” .

This directory contains different codes in different programming languages.

All the codes print the sentence “Hello World!”

There is four different versions of the code written in :

Shell script, nodeJS, C and Python.

We are going to run and compile these files in order to test that all the tools you need are correctly working.

Running

Execute the following commands in order to execute each code:

Language

Shell script nodeJS

C

Python

Command sh ./hello.sh

node ./hello.js

gcc –o hello && ./hello python ./hello.py

All these commands should print : “Hello World!”

Conclusion

Language of choice

You’re on Linux, on Intel.

It means you can use a multitude of languages, compile with gcc directly on Edison if needed.

Even move your binaries from a PC and run them on Edison.

License Creative Commons – By 3.0

You are free:

to Share — to copy, distribute and transmit the work

to Remix — to adapt the work

• to make commercial use of the work

Under the following conditions:

Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

With the understanding that:

Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.

Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.

Other Rights — In no way are any of the following rights affected by the license:

– Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;

– The author's moral rights;

– Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.

Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. http://creativecommons.org/licenses/by/3.0/

Download