Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Internet of Things with Blynk

You're reading from   Hands-On Internet of Things with Blynk Build on the power of Blynk to configure smart devices and build exciting IoT projects

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788995061
Length 271 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Pradeeka Seneviratne Pradeeka Seneviratne
Author Profile Icon Pradeeka Seneviratne
Pradeeka Seneviratne
Arrow right icon
View More author details
Toc

Installing prerequisite software on Raspbian

Now you're ready to install all the required software on your Raspberry Pi to prepare it to work with Blynk Cloud:

  • Update and upgrade packages
  • git core
  • WiringPi
  • Blynk libraries

Updating and upgrading Raspbian

Let's see how to update and upgrade Raspbian:

  1. First, update your system's package list by entering the following command:
pi@raspberrypi:~ $sudo apt-get update

Refer to the following screenshot:

Updating Raspbian
  1. Then, upgrade all your installed packages to their latest versions with the following command:
pi@raspberrypi:~ $sudo apt-get dist-upgrade
  1. When prompted, press Y to continue:
Upgrading Raspbian

Installing git

You will need to install git-core on your Raspberry Pi to work with git repositories for cloning packages like WiringPi, and Blynk libraries.

  1. With the SSH to your Raspberry Pi with PuTTY, run the following command:
pi@raspberrypi:~ $sudo apt-get install git-core
Installing git-core
  1. This will install git on your Raspberry Pi. After installation is complete, verify the version of git by using the following command:
pi@raspberrypi:~ $ git -version

Refer to the following screenshot:

Verifying git version

Installing WiringPi

WiringPi is a PIN-based GPIO access library that can be used with all versions of Raspberry Pi:

  1. First, run the following command to clone the WiringPi repository:
pi@raspberrypi:~ $ git clone git://git.drogon.net/wiringPi

Refer to the following screenshot:

Cloning WiringPi
  1. Then move to the wiringPi directory:
pi@raspberrypi:~ $ cd wiringPi
  1. Run the following command to build the WiringPi:
pi@raspberrypi:~/wiringPi $ ./build

Refer to the following screenshot:

Building WiringPi

Deploying Blynk libraries

Let's look at how to deploy Blynk libraries:

  1. You can deploy the Blynk libraries on Raspberry Pi by running the following commands:
pi@raspberrypi:~/wiringPi $ cd
pi@raspberrypi:~ $ git clone https://github.com/blynkkk/blynk-library.git

Refer to the following screenshot:

Cloning Blynk libraries
  1. After cloning the git repository, move to the linux directory:
pi@raspberrypi:~ $ cd blynk-library/linux
  1. Then build the library from source by targeting Raspberry Pi:
pi@raspberrypi:~/blynk-library/linux $make clean all target=raspberry
  1. This command will output the Blynk file that will be used to connect to the Blynk server:
Building Blynk libraries
You have been reading a chapter from
Hands-On Internet of Things with Blynk
Published in: May 2018
Publisher: Packt
ISBN-13: 9781788995061
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime