Programming In Python - MEDIATEK LinkIt Smart 7688 Developer's Manual

Hide thumbs Also See for LinkIt Smart 7688:
Table of Contents

Advertisement

#include
<stdio.h>
int main(int
argc, char** argv)
{
printf("Hello,
}
Enter the following command to cross-compile it.
3)
CC_TOOLS/bin/mipsel-openwrt-linux-g++ helloworld.c -o helloworld
Assuming the host environment is connected to Wi-Fi of the LinkIt Smart 7688; transfer
4)
the output binary named helloworld to LinkIt Smart 7688 using SCP. For example:
scp ./helloworld
Finally, execute this program in the SSH terminal of LinkIt Smart 7688:
5)
./helloworld
You should see the string
3.7.

Programming in Python

High-level programming languages are executed by the corresponding languages interpreter in
LinkIt Smart 7688. You can do the programming remotely and send the code to LinkIt Smart 7688
for execution.
3.7.1. Setting Up Python Programming Environment
The high-level programming environment is simple. You'll need to install a text editor and a tool
to transfer program files between your computer and LinkIt Smart 7688. Please see section 4.7,
"File Editor and Transfer".
3.7.2. Hello World Example in Python
Open a text editor, copy and paste the below example code and save it as helloworld.py.
1)
print "Hello
World!"
Upload the example to LinkIt Smart 7688 and execute the example code. You do this in
2)
the LinkIt Smart 7688 system console, invoke the Python interpreter by entering the
following commands:
python helloworld.py
Hello World!
And you should see
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
MediaTek LinkIt™ Smart 7688 Developer's Guide
World!\n");
root@mylinkit.local:helloworld
Hello, World!
as the output.
as the program output.
© 2015, 2016 MediaTek Inc.
Page 31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents