MEDIATEK LinkIt Smart 7688 Developer's Manual page 85

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

Advertisement

Remove node-serial port by typing the following command.
7)
$ rm –rf ./node_modules/firmata/node_modules/serialport
Firmata has a built in node-serial port and when you installed Firmata, it creates a compile file on
your computer. However, this compile file needs to be removed because it's already built in LinkIt
Smart 7688.
Compress the Firmata folder
8)
$ tar –cvf ./firmata.tar ./node_modules/firmata
Use scp to transfer the compressed file to LinkIt Smart 7688 Duo
9)
$ scp ./firmata.tar root@mylinkit.local:/root/app/node_modules
Open the LinkIt Smart 7688 Duo SSH system console and type the following commands to
10)
create a directory called app and go to that directory.
$ mkdir app && cd app
Create a file called app.js
11)
$ vim app.js
Type i to insert the following example code:
12)
console.log('WWW blink start ...');
var ledPin = 13;
var firmata = require('firmata');
var board = new firmata.Board("/dev/ttyS0",function(err) {
if (err) {
console.log(err);
board.reset();
return;
}
console.log('connected...');
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
© 2015, 2016 MediaTek Inc.
Page 85

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents