servor

command module
v0.0.0-...-e8bb47a Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 16 Imported by: 0

README

Servor

Servor is a tiny HTTP API that can control a servo connected to a GPIO pin.

Build Status Go Report Card

Getting Started

First, install servor's one dependency: pi-blaster. The easiest way to use servor is with the prebuilt container, e.g.:

docker run -p 8080:8080 squat/servor --pin=18

This container can be deployed to a Kubernetes cluster running on nodes with GPIO, e.g. a Raspberry PI running k3s:

kubectl apply -f https://raw.githubusercontent.com/squat/servor/master/manifests/pi-blaster.yaml
kubectl apply -f https://raw.githubusercontent.com/squat/servor/master/manifests/servor.yaml
kubectl port-forward svc/servor 8080

Once running, open the servor UI in a browser and use the arrow keys or buttons to control the connected servo:

$BROWSER http://localhost:8080

API

Servor exposes two API endpoints:

POST /api/left

This endpoint moves the servo one step to the left.

POST /api/right

This endpoint moves the servo one step to the right.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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