Servor is a tiny HTTP API that can control a servo connected to a GPIO pin.
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=18This 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 8080Once running, open the servor UI in a browser and use the arrow keys or buttons to control the connected servo:
$BROWSER http://localhost:8080Servor exposes two API endpoints:
This endpoint moves the servo one step to the left.
This endpoint moves the servo one step to the right.