The
Toilet-roll security camera is in the process of being rebuilt with a Pi Zero.
First I get the correct image from Raspberrypi.org. Lite has no GUI and is perfect for a headless project like this.
wget https://downloads.raspberrypi.org/raspios_lite_armhf_latest
then to write to the SD card we either
unzip raspios_lite_armhf_latest
Archive: raspios_lite_armhf_latest
inflating: 2020-05-27-raspios-buster-lite-armhf.img
then, as root
dd bs=4M if=2020-05-27-raspios-buster-lite-armhf.img of=/dev/sdd status=progress conv=fsync
(where
/dev/sdd is the SD card on my machine, may be different on yours)
or
unzip -p raspios_lite_armhf_latest | dd bs=4M of=/dev/sdd status=progress conv=fsync
(where
/dev/sdd is the SD card on my machine, may be different on yours)
and you want to reference the drive/card not a partition on the drive.
once the image is written to the SD card
mount the
boot partition and enable
ssh
mount /mnt/sdd1
touch /mnt/sdd1/ssh
sync;umount /mnt/sdd1
(where
sdd1 is the
boot partition on the SD card on my machine, may be different on yours)
mount /mnt/sdd2
cp wpa_supplicant.conf /mnt/sdd2/etc/wpa_supplicant/wpa_supplicant.conf
echo "piserver" >> /mnt/sdd2/etc/hostname
Where
piserver is the name for your new installation and the
wpa_supplicant.conf is a copy of the wifi settings from another working machine.
put the card in Pi and power it up. Then from another machine
ssh pi@piserver.home
sudo raspi-config
Navigate to
enable interfaces and
camera
reboot
ssh into your pi and test the camera
raspistill -o cam.jpg
The light on the camera flashes when the picture is in the process of being taken.
I
scp'd the file off the Pi to view it and ...
Pink, very pink !?
I can find a number of discussions around IR filters, but I have not changed anything since this camera was taking pictures with the previous Pi.
Turns out that in the
process of enabling the new GPU in the Pi 4 Pi Noir broke :( - well, became overly pink.
I tested with the special parameter
-awb greyworld
raspistill -awb greyworld -o cam.jpg
Which worked perfectly
and then fixed it permanently by adding
awb_auto_is_greyworld=1
to
/boot/config.txt and rebooting
and now
raspistill -o cam.jpg
produces the expected, not so pink image.
The Pi Noir camera images are always a little off in colour, due to their sensitivity to IR light.
Next add the PIR sensor...