gpioscheduler

command module
v0.0.0-...-2e4b27e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 14 Imported by: 0

README

GPIO Scheduler

A simple web interface for maintaining gpio pins and setting schedules for gpio pins. The front end in this case is an example of a sprinkler system. Although this can be used for any general scheduling of gpio pins. NOTE: Re-evaluate the TurnOn and TurnOff methods, the relay that this program was build along side of required the 'On' to output.low on the pin.

Install GO

  • brew install go
or (preferred)
then
  • add go to paths
    • e.g.
      • $ export PATH=$PATH:/usr/local/go/bin //added to '/etc/profile' or '$HOME/.profile'
      • $ (optional unless you want to use a directory that's NOT under $HOME/go)export GOPATH=$HOME/go //add to $HOME/.profile or $HOME/.bashrc
      • $ (optional)export PATH=$PATH:$GOPATH/bin //add to $HOME/.profile or $HOME/.bashrc

Install gpioscheduler

  • $ go get -u github.com/peterbradford/gpioscheduler

Running the service

For the frontend

just use the following command in the client directory

  • $ ng serve
  • $ ng build --prod=true //if you want to create a deploy-able folder

with ng serve it'll run on localhost, if you build it with ng build it'll run on the host machines local ip address. The backend is set to always run on the host machines local address

GPIO pins

all gpio pins are mapped on the bonnet except pin 26(physical pin 37).
The used gpio pins for this project are mapped like this 

map<bcm, physical>
{
  4: 7
  5: 29
  6: 31 
  12: 32
  13: 33
  16: 36
  17: 11
  18: 12
  19: 35
  20: 38
  21: 40
  22: 15
  23: 16
  24: 18
  25: 22
  27: 13
}

for this project we will use the bcm pin number when talking about a physical pin.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
server
api
pin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL