MEDIATEK LinkIt Smart 7688 Developer's Manual page 81

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

Advertisement

board.digital[13].write(0)
sleep(0.5)
Now execute this Python script and you should see following message:
3)
$python ./blink_with_firmata.py
Start blinking D13
D13
If you see the LED on
successfully ran the blink example.
To terminate the Python program, press Ctrl-C.
6.6.5.
PyMata Approach
Uploading The Arduino PyMata Sketch
PyMata is a Python interface for the Firmata protocol and it uses its own Firmata sketch.
Therefore you need to install the
Arduino.
Please make sure you've the following:
Download
PyMata
1)
computer and extract it. For example:
Open Arduino IDE and select
2)
Select the PyMata-master.zip file and click OK.
3)
Using FirmataPlus Example
Now you're ready to set up Arduino to listen for Firmata commands from the Serial port.
Open the Arduino IDE 1.6.4 or 1.6.5
1)
In Arduino IDE, open the example
2)
This built-in example is for Arduino Uno, which uses
However, LinkIt Smart 7688 Duo uses
Therefore, you'll need to change the listening port of this example from
Serial to Serial1.
Firmata.begin(57600);
And change it to
3)
Serial1.begin(57600);
Firmata.begin(Serial1);
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
of the LinkIt Smart 7688 Duo blink accordingly, congratulations. You've
PyMata
libraries (PyMata-master.zip) to Arduino library folder on your
C:\Program Files (x86)\Arduino\libraries\
Sketch > Include library > Add .ZIP Library
File > Examples > FirmataPlus > FirmataPlus
Find the following line in the example:
© 2015, 2016 MediaTek Inc.
libraries before you start uploading the sketch to
Serial as Serial port
Serial1
to communicate with OpenWrt.
.
Page 81

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents