Skip to content

Commit

Permalink
Add Pi Zero section to getting started chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
waveform80 committed Jan 9, 2017
1 parent 44879f7 commit 81ccc6c
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 12 deletions.
19 changes: 10 additions & 9 deletions docs/fov.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ can only perform two operations on the sensor: reset a row of elements, or read
a row of elements.

To get a feel for a typical frame capture, we'll walk through the reception of
a couple of frames of data with a hypothetical camera sensor, having a mere 4x4
a couple of frames of data with a hypothetical camera sensor, having a mere 8x8
pixels and no `Bayer filter`_. The sensor is sat in bright light, but as we've
just initialized it, all the elements start off with a count of 0. The sensor's
elements are shown on the left, and our frame buffer that we'll read values
Expand Down Expand Up @@ -509,10 +509,11 @@ view through a window, and query the camera's analog gain and exposure time:
>>> camera.exposure_speed
3318
Now, force the camera to use a higher gain by setting ISO to 800. If you have
the preview running, you'll see very little difference in the scene. However,
if you subsequently query the exposure time you'll find the firmware has
drastically reduced it to compensate for the higher sensor gain:
Now, force the camera to use a higher gain by setting :attr:`~PiCamera.iso` to
800. If you have the preview running, you'll see very little difference in the
scene. However, if you subsequently query the exposure time you'll find
the firmware has drastically reduced it to compensate for the higher
sensor gain:

.. code-block:: pycon
Expand All @@ -523,8 +524,8 @@ drastically reduced it to compensate for the higher sensor gain:
You can force a longer exposure time with the :attr:`~PiCamera.shutter_speed`
attribute at which point the scene will become quite washed out (because both
the gain and exposure time are now fixed). If you let the gain float again by
setting ISO back to automatic (0) you should find the gain reduces accordingly
and the scene returns more or less to normal:
setting :attr:`~PiCamera.iso` back to automatic (0) you should find the gain
reduces accordingly and the scene returns more or less to normal:

.. code-block:: pycon
Expand All @@ -535,9 +536,9 @@ and the scene returns more or less to normal:
>>> float(camera.analog_gain)
1.0
The camera's AGC loop attempts to produce a scene with a target Y
The camera's AGC loop attempts to produce a scene with a target Y'
(`luminance`_) value (or values) within the constraints set by things like ISO,
shutter speed, and so forth. The target Y value can be adjusted with the
shutter speed, and so forth. The target Y' value can be adjusted with the
:attr:`~PiCamera.exposure_compensation` attribute which is measured in
increments of 1/6th of an `f-stop`_. So if, whilst the exposure time is fixed,
you increase the luminance that the camera is aiming for by a couple of stops,
Expand Down
Binary file added docs/images/pi_zero_assembled.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pi_zero_pieces.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 38 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,42 @@ a well-seated camera cable with the correct orientation:
:align: center

Make sure the camera module isn't sat on anything conductive (e.g. the Pi's
USB ports or its GPIO pins). Now, apply power to your Pi. Once booted, start
the Raspberry Pi Configuration utility and enable the camera module:
USB ports or its GPIO pins).

Pi Zero
=======

The 1.2 model of the `Raspberry Pi Zero`_ includes a small form-factor CSI port
which requires a `camera adapter cable`_.

.. image:: images/pi_zero_pieces.jpg
:width: 640px
:align: center

To attach a camera module to a Pi Zero:

1. Remove the existing camera cable by gently lifting the collar on the camera
module and pulling the cable out.

2. Next, insert the adapter cable with the conductors facing in the same
direction as the camera's lens.

3. Finally, attach the adapter to the Pi Zero by gently lifting the collar at
the edge of the board (be careful with this as they are much more delicate
than the collars on the regular CSI ports) and inserting the smaller end of
the adapter with the conductors facing the back of the Pi Zero.

Your setup should look something like this:

.. image:: images/pi_zero_assembled.jpg
:width: 640px
:align: center

Testing
=======

Now, apply power to your Pi. Once booted, start the Raspberry Pi Configuration
utility and enable the camera module:

.. image:: images/enable_camera.png
:align: center
Expand All @@ -51,3 +85,5 @@ recommendations suggested by such messages. If your Pi reboots as soon as you
run this command, your power supply is insufficient for running your Pi plus
the camera module (and whatever other peripherals you have attached).

.. _Raspberry Pi Zero: https://www.raspberrypi.org/products/pi-zero/
.. _camera adapter cable: https://shop.pimoroni.com/products/camera-cable-raspberry-pi-zero-edition
2 changes: 1 addition & 1 deletion picamera/mmalobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ class MMALDecoder(MMALComponent):
class MMALVideoDecoder(MMALDecoder):
"""
Represents the MMAL video decoder component. This component has 1 input
port and ? output ports. The input port is usually configured with
port and 1 output port. The input port is usually configured with
``MMAL_ENCODING_H264`` or ``MMAL_ENCODING_MJPEG``.
"""
__slots__ = ()
Expand Down

0 comments on commit 81ccc6c

Please sign in to comment.