Blynk supports over 400 hardware platforms and major connectivity types such as Ethernet, Wi-Fi, Bluetooth, Bluetooth Low Energy, and USB; however, it is very difficult to explain how to build devices for Blynk using all the supporting hardware platforms in a single book. Therefore, this book will be using Raspberry Pi as the hardware platform to demonstrate the ability and power of Blynk.
Getting parts
Raspberry Pi
Raspberry Pi is a small, programmable device. It is a mixture between a very small computer and a programmable embedded board. You can connect the Raspberry Pi to the internet through Wi-Fi or Ethernet. You will be using Raspberry Pi 3, the latest model of the Raspberry Pi family, as the hardware platform; however, you can use other versions of Raspberry Pi, such as Raspberry Pi 2/A+/B+ and Raspberry Pi A/B (revision 2) to work with projects that we will be discussing throughout the book.
Here is a list of the Raspberry Pi boards available in reverse chronological order:
- Raspberry Pi 3 Model B (third-generation single-board computer)
- Raspberry Pi 2 Model B (the Raspberry Pi 2 Model B is the second-generation Raspberry Pi)
- Raspberry Pi 1 Model B+ (the model B+ is the final revision of the original Raspberry Pi)
- Raspberry Pi 1 Model A+ (the model A+ is the low-cost variant of Raspberry Pi)
- Raspberry Pi Zero W (single-board computer with wireless and Bluetooth connectivity)
- Raspberry Pi Zero (lowest-cost single-board computer)
Refer to the following screenshot:
Following is the list of important specifications of Raspberry Pi Model 3:
- Quad Core 1.2 GHz Broadcom BCM2837 64-bit CPU
- 1 GB RAM
- BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
- 40 extended GPIO pins
- 4 USB 2 ports
- 4 Pole stereo output and composite video port
- Full-size HDMI
- CSI camera port for connecting a Raspberry Pi camera
- DSI display port for connecting a Raspberry Pi touchscreen display
- Micro SD port for loading your operating system and storing data
- Upgraded switched Micro USB power source up to 2.5 A
You will learn more technical details about Raspberry Pi in Chapter 2, Building Your First Blynk Application.
Raspberry Pi can be plugged in to a computer monitor or TV, and uses a standard keyboard and mouse. If you want, you can use the Raspberry Pi without attaching a monitor/TV, keyboard, or mouse.
You will need the following things to prepare your Raspberry Pi before installing Raspbian:
- SD card: 8 GB class 4 SD card is recommended; however, you can use one with higher capacity like 16 GB, 32 GB, or 64 GB. But having a class 10 micro SD card in your Raspberry Pi is very much recommended. Don't use SD cards lower than class 4, because they provide very low writing speed. The following screenshot shows an 8 GB Kingston class 4 micro SD card. The SD card works as the hard drive of your Raspberry Pi:
- Power supply: Raspberry Pi is powered by a micro USB power supply. You'll need a good-quality power supply that can supply at least 2 A at 5V for the Raspberry Pi 3 Model B, or 700 mA at 5V for the earlier, lower-powered models. The following screenshot shows a micro USB power supply for Raspberry Pi:
- A Wi-Fi dongle (required for earlier, lower-powered models): Allows you to connect your Raspberry Pi to a wireless network. The following screenshot shows the official and recommended universal USB Wi-Fi dongle for Raspberry Pi.
- Ethernet (network) cable [Model B/B+/2/3 only]: An Ethernet cable is used to connect your Pi to a local network and the internet. The following screenshot shows an Ethernet cable:
Setting up Raspberry Pi
Let's see how to set up Raspberry Pi:
- Place your SD card into the SD card slot on the Raspberry Pi. It will only fit one way
- Plug your keyboard and mouse in to the USB ports on the Raspberry Pi
- Connect your HDMI cable from your Raspberry Pi to your monitor or TV
- Connect a Wi-Fi dongle to one of the USB ports (unless you have a Raspberry Pi 3)
- The Raspberry Pi is powered by the micro USB power supply