Skip to content
balena + python + raspberry pi camera module
Python Shell
Branch: master
Clone or download
Latest commit 3ca1dac Oct 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
Dockerfile.template avoid RPi detection in picamera pip install Mar 30, 2018
README.md URL correction Oct 15, 2018
demo.py Updating projects: documentation, make sure best practices are used a… Nov 10, 2015
requirements.txt Updating projects: documentation, make sure best practices are used a… Nov 10, 2015
start.sh Update start.sh Feb 11, 2017

README.md

balena + python + raspberry pi camera module

This is a simple app that demonstrates how to get started with the raspberry pi camera module. All it does is snap one photo and then stores it in the /data directory on the pi.

You will need to make some changes to the Raspberry Pi device configuration to enable the camera, instructions here -> https://balena.io/docs/learn/develop/hardware/i2c-and-spi/#raspberry-pi-camera-module

The /data directory allows the data, in this case the image, to persist between code deployments with balena. Then you can use the web terminal session to poke around on the pi itself and see that your photo was successfully saved in the /data directory.

A file server is running on the device, by using python's simplehttpserver. That way you can view the image taken by simply using the public url of the device.

This option can be found in the Actions tab in your device dashboard.

Actions Tab

This example makes use of the awesome picamera python module, which natively controls the camera module and does not depend on raspistill.

You can’t perform that action at this time.