This is a sample code to build a rpi hosted webserver triggering a photo shoot on /snap
route. It is deployed and can be reached remotely using resin.io's amazing product.
GET /
html page giving routesGET /snap
triggers a photo shootGET /snap.jpg
displays latest taken photo
- Resin.io doc
- npm raspicam module
- libraspberrypi-bin
Notice the importance of setting the right variables (or manually configure'em on the resin image) with the following resin.io fleet/device parameters:
RESIN_HOST_CONFIG_start_x 1
RESIN_HOST_CONFIG_gpu_mem 128
RESIN_HOST_CONFIG_fixup_file fixup_x.dat
RESIN_HOST_CONFIG_start_file start_x.elf