MEDIATEK LinkIt Smart 7688 Developer's Manual page 82

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

Advertisement

Upload the sketch. After uploading the sketch, Arduino is ready to receive commands
4)
from the Linux side.
Running Blink Example Using PyMata
After you've installed PyMata libraries and changed the serial port in Arduino, you're ready
to run the blink example using PyMata.
Download
blink example
1)
You'll also need to change the serial port used in this example to work on LinkIt Smart
7688 Duo. Find the following line on the example:
# Create a PyMata instance
board
=
PyMata("/dev/ttyACM0", verbose=True)
And change it to:
2)
# Create a PyMata instance
board
=
PyMata("/dev/ttyS0", verbose=True)
Execute the python script and you should see following output:
3)
$python ./pymata_blink.py
Python Version 2.7.9 (default, Aug 12 2015, 15:09:09)
[GCC 4.8.3]
PyMata version 2.10
reserved.
Opening Arduino Serial port /dev/ttyS0
Please wait while Arduino is being detected. This can take up to 30
seconds ...
Board initialized in 0 seconds
Total Number of Pins Detected = 30
Total Number of Analog Pins Detected = 12
Blinking LED on pin 13 for 10 times ...
1
2
3
4
5
6
7
8
9
10
PyMata close(): Calling sys.exit(0): Hope to see you soon!
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
to LinkIt Smart 7688 Duo.
Copyright(C) 2013-15 Alan Yorinks
© 2015, 2016 MediaTek Inc.
All rights
Page 82

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents