Giter Site home page Giter Site logo

pisupply's Introduction

PiSupply

A C++ program that handles the Pi Supply switch.

Instructions

  1. Log in to your Raspberry Pi via SSH
  1. Make sure that you have git installed
sudo apt-get install git-core
sudo apt-get update
sudo apt-get upgrade
  1. Go to home directory and Install WiringPi
cd /home/pi
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build
  1. Go to home directory again and clone this repo.
cd /home/pi
git clone https://github.com/kr15h/PiSupply.git
  1. Enter the newly created PiSupply directory and Compile using GCC.
cd PiSupply
gcc -o PiSupply -I/usr/local/include -L/usr/local/lib -lwiringPi main.cpp
  1. Launch application and see if it works. The code inside main.cpp uses GPIO pin 7 to listen for the soft shutdown signal.
sudo ./PiSupply

Launch in Background

You might be interested to launch this in background so you can launch other apps and services. I doubt that the PiSupply could be the only reason for using the Raspberry Pi. To launch the application in background, use the following command:

nohup sudo /home/pi/PiSupply/PiSupply &

In my case I've added this to a startup shell script so it is launched when my RPi boots up. I won't explain it here now, there are a lot of different ways to do that.

Hope this will be useful for somebody.

pisupply's People

Contributors

gjchester avatar kr15h avatar

Watchers

 avatar  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.