Controlling Raspberry Pi GPIO using Android App

Raspberry Pi is very popular for IoT projects because of its seamless ability of wireless communication over internet. Raspberry Pi 3 has inbuilt Wi-Fi and Bluetooth, and Bluetooth is a very popular wireless communication Protocol. So today we are going to Control Raspberry Pi GPIO Pin through an Android app using Bluetooth.

Here we are using Raspberry 2 Pi Model B which don’t have inbuilt Bluetooth, so we are using a simple USB Bluetooth dongle. Apart from that we only need a resistor (220R) and a LED to demonstrate the GPIO controlling. Here we are using RFCOMM Bluetooth protocol for wireless communication.

Read More

Python based I2C functions for Raspberry Pi

Let’s see basic Python based I2C functions which are frequently used for I2C communication on Raspberry Pi.

While developing program for Raspberry Pi I2C communication in python, we can use SMBus library package which has great support to access I2C devices. So, we should add SMBus support for Python by using apt packet manager,

sudo apt-get install python-smbusRead More

Raspberry Pi PWM Generation using Python and C

PWM (Pulse Width Modulation) is a modulation technique by which the width of pulse is varied while keeping the frequency constant. Through PWM technique, we can control the power delivered to the load by using ON-OFF signal. The PWM signals can be used for applications such as controlling the speed of DC motors, changing intensity of an LED, controlling Servo motors, etc.

Raspberry Pi PWM:

Raspberry Pi has two PWM channels i.e. PWM0 and PWM1.

PWM pins for the two PWM channels on 40-pin P1 header are as follows:

GPIO Pin PWM0/PWM1
GPIO12 PWM0
GPIO18 PWM0
GPIO13 PWM1
GPIO19 PWM1

 

Read More

Raspberry Pi GPIO Access

GPIO (General Purpose Input Output) pins can be used as input or output and allows raspberry pi to connect with general purpose I/O devices.

  • Raspberry pi 3 model B took out 26 GPIO pins on board.
  • Raspberry pi can control many external I/O devices using these GPIO’s.
  • These pins are a physical interface between the Pi and the outside world.
  • We can program these pins according to our needs to interact with external devices. For example, if we want to read the state of a physical switch, we can configure any of the available GPIO pins as input and read the switch status to make decisions.  We can also configure any GPIO pin as an output to control LED ON/OFF.
  • Raspberry Pi can connect to the Internet using on-board Wi-Fi or Wi-Fi USB adapter. Once the Raspberry Pi is connected to the Internet then we can control devices, which are connected to the Raspberry Pi, remotely.

Read More

How to use WiringPi Library on Raspberry Pi

WiringPi is a library written in C used to access GPIO pins on Raspberry for BCM2835 (Broadcom Processor) SoC (System on Chip). There are various libraries are available to access GPIO in C like bcm 2835, sysfs, pigpio, etc. Here, we are using WiringPi library for Raspberry Pi GPIO access.

To use wiringPi, first we should install it on Raspberry Pi. This installation can be done in two ways which is as follows,

WiringPi Library Installation:

This way of installing WiringPi library will use git.Read More

Do NOT follow this link or you will be banned from the site!