How to install Blynk in Raspberry Pi

There many ways you can install Blynk in your Raspberry Pi board. The first one is using Node.js and OnOff modules where you can directly turn on and off the GPIO pins without coding.

Advertisements

Option 1:Using Node.js library and OnOff Module

1.Open the terminal and run this commands below to remove old versions of Node.js

sudo apt-get purge node nodejs node.js -y
sudo apt-get autoremove

2.Run this commands below To install Node.js

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential nodejs -y


3.This command is to check the node version.Make sure it shows the version number something like this-v9.9.5 or any other versions.

node --version

4.This command shows the npm version of the Raspberry Pi.

npm -v

5.If it shows npn command not found error,then install the npm using the commad given below.

sudo apt-get install npm

6.To install Blynk and OnOff library.

sudo npm install blynk-library -g
sudo npm install onoff -g --unsafe-perm

7.To run the Blynk client.

export PATH=$PATH:/opt/nodejs/bin/
unset NODE_PATH
blynk-client YourAuthToken

8.Congrats you have successfully installed the Blynk server in your Pi.


Blynk Configuration

Output

Knowledge is Power

Design a site like this with WordPress.com
Get started