Giter Club home page Giter Club logo

rpigpiocontroller's Introduction

RPi Gpio Controller

RPi Gpio Controller logo

Project description:

  • Get the information of your Raspberry Pi.
  • Check and control the Raspberry Pi from your Android device.
  • Shutdown and reboot it remotely.

First we have to make some configurations on the Raspberry Pi.

Prepare Raspberry

Update all the Raspberry libraries

sudo apt-get update -y && sudo apt-get upgrade -y

Install web server

It must run will any web server, but I prefer Apache.

sudo apt-get install apache2

Install PHP

The web server language that controls the host petitions.

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5 libapache2-mod-perl2 php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap php5-mhash php5-mysql php5-odbc

Create groups and modify permissions

We need execute some instructions from a http petition, so is required that the user www-data can execute bash commands from PHP script.

sudo chown www-data:www-data /var/www/
sudo chmod 775 /var/www/
sudo usermod -a -G www-data pi

Creates the new user

sudo visudo

At the end of the file opened add the next line:

  • www-data ALL=(root) NOPASSWD:ALL

And restart the server

sudo /etc/init.d/apache2 restart

Download code

Install git to clone the repository

sudo apt-get install git

Use the GPIO library to access to pins

sudo git clone https://github.com/danny270793/Gpio.git
cd Gpio

Install the GPIO library

sudo python setup.py install

Depending on you Raspbian version you will find the DocumentRoot folder into a different location

cd /var/www
 --- or ---
cd /var/www/html

Download the RpiGpioController code

sudo git clone https://github.com/danny270793/RPiGpioController.git
cd RPiGpioController

Configure credentials

Change the access credentials

sudo nano php/info.php
<?php
	$user="admin";
	$password="admin";
    ...

Test the Android application

  • Download RPi Gpio Controller from the google play store.
  • Login with your Raspberry IP address and the credentials previously configured.
  • See your Raspberry Pi information.
  • Shutdown and reboot your Raspberry remotely
  • Control the GPIO pins.

Follow me

Version

RPiGpioController version 2.0.16.09.16.19.30
Last update 04/09/2016

rpigpiocontroller's People

Contributors

danny270793 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.