As I have mostly only older hardware, and as of yet been unable to join the elite ESP users I keep pushing on trying to learn stuff I didn’t really want to learn to begin with… control stuffs without coding they says… hmmm, marketing people…
Anyhow… having had very little success with my older RPi and Blynk (either works but no examples (wiringPi), or doesn’t work but with limited examples (Node)… I have decided to change tracks and work with something even less well documented, Blynk wise…
1GHz CPU, runs Linux, has 512MB RAM, 4GB (actually 8GB) Flash, WiFi b/g/n, BT 4.0… what could possibly go wrong??
I have successfully installed Local Server on C.H.I.P.… but I want MOAR!!
So, anyhow I basicly loaded one up using the following directions:
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g npm
sudo npm install -g onoff
sudo npm install -g blynk-library
And successfully ran: blynk-client <auth>
on Cloud Server.
OnOff mode
Connecting to: blynk-cloud.com 8441
SSL authorization...
Connected
Authorized
Blynk ready.
In the app I chose Generic Board and added 7 buttons (then ran out of energy - I miss my Local Server ) referencing digital pins 0-6 out of the 8 I believe the C.H.I.P. has; I was hoping to keep pushing buttons until I saw my LED (plugged into random GPIO pins) light up, thus determining the correct direct pin reference (virtual pins and code comes later, baby steps here).
From there I hit a wall… as soon as I hit any app button the CLI on the C.H.I.P. threw an error:
EACCES: permission denied, open ‘/sys/class/gpio/export’
A quick Google later said it had to do with permissions, and that was resolved with adding sudo; sudo blynk-client <auth>
But now I get this error:
(node:1243) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:1243) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:90
_ throw err; // Forgot a callback but don’t know where? Use NODE_DEBUG=fs_
_ ^_
Error: EPERM: operation not permitted, write
So, basicly I am thinking that Generic Board may not be the answer and I have to wait for a supported board addition to the library???
Did I use too new of a NODEJS install?? ver 7 instead of 6?
Or am I just hitting another wall, again, and my successful Blynk use is doomed to remain limited and tethered via USB link and my Arduinos