All Projects → jamesthompson → piserv

jamesthompson / piserv

Licence: other
Raspberry Pi HTTP Interface for GPIO Control

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to piserv

ferver
A Ruby gem to serve files over HTTP, packaged as a Ruby gem
Stars: ✭ 14 (-33.33%)
Mutual labels:  webserver
WebServer tng
ESP8266/ESP32 WebServer
Stars: ✭ 65 (+209.52%)
Mutual labels:  webserver
web-haskell-graphql-postgres-boilerplate
Modern webserver in Haskell: Graphql + Postgresql + Authentication + DB migration + Dotenv and more
Stars: ✭ 114 (+442.86%)
Mutual labels:  webserver
LiveServer.jl
Simple development server with live-reload capability for Julia.
Stars: ✭ 81 (+285.71%)
Mutual labels:  webserver
da4qi4
a cpp Web Server
Stars: ✭ 148 (+604.76%)
Mutual labels:  webserver
gpio
A native Go library for Raspberry Pi GPIO
Stars: ✭ 109 (+419.05%)
Mutual labels:  gpio
bangu
🍓This project is about smart ehouse which base on python, Raspberry Pi, deep learning and so on.
Stars: ✭ 20 (-4.76%)
Mutual labels:  gpio
PsWebServer
Civet web server integration plugin for Unreal Engine 4
Stars: ✭ 24 (+14.29%)
Mutual labels:  webserver
easydoc
EasyDoc, Easy to generate Documents. 🌱 EasyDoc,简单、快速生成文档的工具。
Stars: ✭ 69 (+228.57%)
Mutual labels:  webserver
rfoutlet
Control remote controlled outlets via Raspberry PI
Stars: ✭ 14 (-33.33%)
Mutual labels:  gpio
pigpio-client
A nodejs client for pigpio socket interface.
Stars: ✭ 24 (+14.29%)
Mutual labels:  gpio
restana
Super fast and minimalist framework for building REST micro-services.
Stars: ✭ 380 (+1709.52%)
Mutual labels:  webserver
vhost-gen
Configurable vHost generator for Apache 2.2, Apache 2.4 and Nginx
Stars: ✭ 111 (+428.57%)
Mutual labels:  webserver
quickserv
Dangerously user-friendly web server for quick prototyping and hackathons
Stars: ✭ 275 (+1209.52%)
Mutual labels:  webserver
go-gin-web-server
Deploy Go Gin on Render
Stars: ✭ 23 (+9.52%)
Mutual labels:  webserver
pirrot
A radio repeater controller (supporting both simplex and duplex operation modes) for the RaspberryPi.
Stars: ✭ 25 (+19.05%)
Mutual labels:  gpio
MulleScion
🌱 A modern template engine for Objective C
Stars: ✭ 14 (-33.33%)
Mutual labels:  webserver
copyparty
⇆🎉 http file sharing hub (py2/py3)
Stars: ✭ 45 (+114.29%)
Mutual labels:  webserver
nanoFramework.WebServer
📦 Web server for nanoFramework packed with features: REST api using attributes, multithread requests, parameters in query URL, static files serving.
Stars: ✭ 15 (-28.57%)
Mutual labels:  webserver
SnorkTracker
GPS IoT tracker board for scanning gps and environment information and sending this to a MQTT server via GPRS.
Stars: ✭ 38 (+80.95%)
Mutual labels:  webserver

piserv

A haskell-powered web server for Raspberry Pi GPIO control making use of the haskell wiringPi package and servant.

Running the server

Download this repo and use the zipped binary piserver on your RPi. Only tested on a Model B+ RPi as of yet.

Please install the low-level wiringpi library first on your RPi thus:

> sudo apt-get install wiringpi

Then run the binary on your RPi as either root or by setting the environment variable in your profile as follows:

> echo "export WIRINGPI_GPIOMEM=1" >> ~/.profile

The server will run by default on PORT=8080. You can parameterize the PORT for the executable at runtime as follows:

> ./piserver 8081 # where 8081 is port 8081 for example

You can test the server using a simple curl like:

curl -i http://localhost:8080/piboardrev

Endpoints

Please see API.md for the automatically generated API documentation. You can get this by hitting /docs endpoint. Alternatively, any non-matched URL will return this documentation.

GET /health should return OK if the server is running.

Building the package on your own RPi

I installed my GHC 8.0.1 / Stack LTS 7.18 / LLVM-3.7 setup using the script here.

I include the binary as it took a long time to build. Some packages, notably text, vector, bytestring, aeson, lens are probably best installed one at a time using stack before unleashing the full stack build.

My RPi build (for binary included here) is as follows:

Linux raspberrypi 4.4.34-v7+ #930 armv7l GNU/Linux Raspbian "Jessie".

CPU Param Value
processor 0
model name ARMv7 Processor rev 5 (v7l)
BogoMIPS 38.40
Features half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer 0x41
CPU architecture 7
CPU variant 0x0
CPU part 0xc07
CPU revision 5
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].