Blynk Library Version: 0.3.8
OS: Linux 4.4.15-v7+
Node: v4.2.1
NPM: v2.14.7
Device: RPi 3 +B
Internet Source: Wifi
Objective: To properly run blynk.syncAll script in terminal.
Current Coding Rank: Noob
After reading a few threads/topics on the blynk.syncAll function, I found the information on it here:
(http://docs.blynk.cc/#blynk-main-operations-state-syncing-for-hardware)
Furthermore, I followed the link from that section and ended up copying/pasting the script from
(https://github.com/blynkkk/blynk-library/blob/master/examples/More/Sync/Sync.ino)
into a file called syncall.js. I attempted running sudo js syncall.js in the terminal after saving the file but get this output:
pi@raspberrypi:~ $ sudo js syncall.js
/home/pi/syncall.js:1
(function (exports, require, module, _filename, __dirname) { #define BLYNKPR
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
pi@raspberrypi:~ $
It’s obvious to me that the first line of script, #define BLYNK_PRINT Serial, is catching onto something but I don’t know enough to know what that thing is. Any advice would be so appreciated. This is basically my last obstacle in my current mission and it sucks not knowing enough to overcome it.