Skip to content

rohnemus/PowerBlock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerBlock Driver

This is the driver for the petrockblock.com PowerBlock, which is an extension board for the Raspberry Pi (TM). The driver itself is denoted as powerblock in the following. The driver provides a service for interacting with the power button signal as well as driving the optionally attached LED.

Prerequisites

To be able to successfully build powerblock you need to have certain APT packages installed. You can make sure that you have the latest version of those packages with these commands:

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y cmake g++-4.9

Downloading the Sources

If you would like to download the latest version of powerblock from its Github repository, you can use this command:

git clone https://github.com/petrockblog/PowerBlock.git

Building and Installation

To build controlblock follow these commands:

cd PowerBlock
make

If everything went fine you can install with the command

sudo make install

Installation as Service

You can install powerblock as daemon with this command:

sudo make installservice

It might be that you need to restart your Raspberry afterwards to have all needed services running.

Uninstalling the service and/or the binary

You can uninstall the daemon with this command:

sudo make uninstallservice

You can uninstall the binary with this command:

sudo make uninstall

Configuration

The configuration file of powerblock is located at /etc/powerblockconfig.cfg. It uses JSON syntax for setting the the values of its configuration parameters.

The parameters are explained in detail in the following:

  • powerswitch - activated: Can be set to
    • true: Activates the handling of the power switch signals of the PowerBlock.
    • false: Deactivates the handling of the power switch signals of the PowerBlock.



Have fun!

-Florian petrockblock.com

About

Driver for petrockblock.com PowerBlock

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 72.2%
  • Python 22.1%
  • Shell 2.2%
  • CMake 2.2%
  • Makefile 0.9%
  • C 0.3%
  • HTML 0.1%