Step one is to configure the operating system on the Pi. Connect the external monitor, and mouse and keyboard. Then apply power and configure as you normally would for a Raspberry Pi. The Pi should boot automatically from the flash drive.

Follow the on-screen instructions. When you have the install done, run Preferences->Raspberry Pi Configuration. I recommend changing the Pi's name. Then configure the interfaces. Be sure to enable SPI, I2C, and Camera.

When you click OK you should reboot the Pi.

Step two is to configure the Hyperpixel 4 display. Run this command as the user pi, not root (i.e., don't use sudo):

curl https://get.pimoroni.com/hyperpixel4 | bash

When it runs, it will ask for your display. Pick the correct one. If you are following this guide to the letter, you'll want the Pi 4 Square option.

When the script has finished running, it will ask if you want to reboot. Say yes.

Step three is to make the system usable. The display will be upside down when the Pi comes back up, which makes it a bit difficult to use. Fortunately, there is a command that will fix it. You'll only need this once:

hyperpixel4-rotate inverse

Now the display will be right side up and you can use it like any other Raspberry Pi.

Taking Pictures

Copy the following text to a file called lowlight.py. You can click the Download Project Bundle link to get a zip file containing the Python file:

# SPDX-FileCopyrightText: 2021 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT

from picamera import PiCamera
import time
from fractions import Fraction
import datetime

cur_time = datetime.datetime.now()
stub = cur_time.strftime("%Y%m%d%H%M_low")

camera = PiCamera(framerate=Fraction(1,6))

# You can change these as needed. Six seconds (6000000)
# is the max for shutter speed and 800 is the max for ISO.
camera.shutter_speed = 1750000
camera.iso = 800

time.sleep(30)
camera.exposure_mode = 'off'

outfile = "%s.jpg" % (stub)
camera.capture(outfile)

camera.close()

Run the program on your py to take a picture. It will save a jpg in the current directory with a timestamp.

$ ./lowlight.py

Adjust the shutter speed to get the exposure you want.

This guide was first published on May 18, 2021. It was last updated on 2021-05-18 17:05:44 -0400.

This page (Software Configuration) was last updated on May 24, 2022.

Text editor powered by tinymce.