Raspberry Pi

Freeze Time Using 15 Raspberry Pis to Create a Bullet-Time Effect

posted Oct 17, 2020, 7:59 PM by Chris G   [ updated Oct 17, 2020, 8:00 PM ]

Take cool 3D shots with a few Raspberry Pi cameras.

(Image credit: Eric Paré)

Have you ever wanted to live in the Matrix? No? Well, surely you've wanted to freeze time like those cool shots with Neo and Agent Smith, right? That effect is known as the bullet-time effect and this maker shows you how to do it using the Raspberry Pi!

This project comes to us from creator and photographer Eric Paré through the Xangle channel on YouTube. Using 15 Raspberry Pi cameras, Paré was able to create an impressive bullet-time effect.

Raspberry Pi Sky Camera Captures Time-Lapse Images of Space

posted Oct 17, 2020, 7:51 PM by Chris G   [ updated Oct 17, 2020, 7:52 PM ]

Ever wanted to get a better view of the stars in the night sky or, if you live an area with northern lights, a great photo of the aurora borealis? This Raspberry Pi project comes to us from a maker known as Jani. Using just a couple of Raspberry Pis and the HQ camera, they were able to capture time-lapse images of the night sky with a beautiful end result.

According to Jani, the goal was to automate a night sky camera with temperature control to withstand more serious weather conditions. The setup uses a Raspberry Pi along with a 180° lens for the camera module.

Turn your Raspberry Pi into homemade Google Home

posted Oct 17, 2020, 7:48 PM by Chris G   [ updated Oct 17, 2020, 7:49 PM ]

Google Home is a beautiful device with built-in Google Assistant — A state of the art digital personal assistant by Google. — which you can place anywhere at your home and it will do some amazing things for you. It will save your reminders, shopping lists, notes, and most importantly answers your questions and queries based on the context of the conversations.

In this article, you are going to learn to turn your Raspberry Pi into a homemade Google Home device which is,

  • Powered by Google Assistant.
  • Voice-activated. No need to press any button, just say “Ok Google” or “Hey Google” and ask your question.
  • There will be a LED indicator that will stay on whenever the conversation between the user and the Google Assistant it in progress.
  • It can initialize on boot so no need to login and run the script from the terminal after reboots.

How to Squeeze 50% More Memory Out of Your Raspberry Pi with zram

posted Sep 20, 2020, 3:17 PM by Chris G   [ updated Sep 20, 2020, 3:17 PM ]

How to Squeeze 50% More Memory Out of Your Raspberry Pi with zram

I demonstrate how you can use zram to increase the available memory of your Raspberry Pi by more than 50% with a negligible performance impact.

Run a Minecraft server for free on Kubernetes

posted Aug 9, 2020, 9:56 AM by Chris G   [ updated Aug 9, 2020, 9:57 AM ]

Simplify deployment for multiplayer Minecraft on a self-hosted Raspberry Pi server using Kubernetes

Image for post
Photo by Nina PhotoLab on Unsplash

Just like Minecraft is more fun when a friend shows you how to make torches and avoid creepers, Kubernetes is also less scary with someone to guide the way.

The Minecraft wiki has lots of pointers for setting up your own server. But it doesn’t say how to do it with Kubernetes. I recently learned how easy it is to deploy an app to a local Raspberry Pi with Kubernetes.

Let’s try it again — this time to run a free Minecraft server on Kubernetes.

Setting up two-factor authentication on your Raspberry Pi

posted Jul 10, 2020, 4:11 PM by Chris G   [ updated Sep 8, 2020, 6:48 AM ]

From: https://www.raspberrypi.org/blog/setting-up-two-factor-authentication-on-your-raspberry-pi/


Enabling two-factor authentication (2FA) to boost security for your important accounts is becoming a lot more common these days. However you might be surprised to learn that you can do the same with your Raspberry Pi. You can enable 2FA on Raspberry Pi, and afterwards you’ll be challenged for a verification code when you access it remotely via Secure Shell (SSH).

Accessing your Raspberry Pi via SSH

A lot of people use a Raspberry Pi at home as a file, or media, server. This is has become rather common with the launch of Raspberry Pi 4, which has both USB 3 and Gigabit Ethernet. However, when you’re setting up this sort of server you often want to run it “headless”; without a monitor, keyboard, or mouse. This is especially true if you intend tuck your Raspberry Pi away behind your television, or somewhere else out of the way. In any case, it means that you are going to need to enable Secure Shell (SSH) for remote access.

However, it’s also pretty common to set up your server so that you can access your files when you’re away from home, making your Raspberry Pi accessible from the Internet.

Most of us aren’t going to be out of the house much for a while yet, but if you’re taking the time right now to build a file server, you might want to think about adding some extra security. Especially if you intend to make the server accessible from the Internet, you probably want to enable two-factor authentication (2FA) using Time-based One-Time Password (TOTP).

What is two-factor authentication?

Two-factor authentication is an extra layer of protection. As well as a password, “something you know,” you’ll need another piece of information to log in. This second factor will be based either on “something you have,” like a smart phone, or on “something you are,” like biometric information.

We’re going to go ahead and set up “something you have,” and use your smart phone as the second factor to protect your Raspberry Pi.

Updating the operating system

The first thing you should do is make sure your Raspberry Pi is up to date with the latest version of Raspbian. If you’re running a relatively recent version of the operating system you can do that from the command line:

$ sudo apt-get update
$ sudo apt-get full-upgrade

If you’re pulling your Raspberry Pi out of a drawer for the first time in a while, though, you might want to go as far as to install a new copy of Raspbian using the new Raspberry Pi Imager, so you know you’re working from a good image.

Enabling Secure Shell

The Raspbian operating system has the SSH server disabled on boot. However, since we’re intending to run the board without a monitor or keyboard, we need to enable it if we want to be able to SSH into our Raspberry Pi.

The easiest way to enable SSH is from the desktop. Go to the Raspbian menu and select “Preferences > Raspberry Pi Configuration”. Next, select the “Interfaces” tab and click on the radio button to enable SSH, then hit “OK.”

You can also enable it from the command line using systemctl:

$ sudo systemctl enable ssh
$ sudo systemctl start ssh

Alternatively, you can enable SSH using raspi-config, or, if you’re installing the operating system for the first time, you can enable SSH as you burn your SD Card.

Enabling challenge-response

Next, we need to tell the SSH daemon to enable “challenge-response” passwords. Go ahead and open the SSH config file:

$ sudo nano /etc/ssh/sshd_config

Enable challenge response by changing ChallengeResponseAuthentication from the default no to yes.

Editing /etc/ssh/ssd_config.

Then restart the SSH daemon:

$ sudo systemctl restart ssh

It’s good idea to open up a terminal on your laptop and make sure you can still SSH into your Raspberry Pi at this point — although you won’t be prompted for a 2FA code quite yet. It’s sensible to check that everything still works at this stage.

Installing two-factor authentication

The first thing you need to do is download an app to your phone that will generate the TOTP. One of the most commonly used is Google Authenticator. It’s available for AndroidiOS, and Blackberry, and there is even an open source version of the app available on GitHub.

Google Authenticator in the App Store.

So go ahead and install Google Authenticator, or another 2FA app like Authy, on your phone. Afterwards, install the Google Authenticator PAM module on your Raspberry Pi:

$ sudo apt install libpam-google-authenticator

Now we have 2FA installed on both our phone, and our Raspberry Pi, we’re ready to get things configured.

Configuring two-factor authentication

You should now run Google Authenticator from the command line — without using sudo — on your Raspberry Pi in order to generate a QR code:

$ google-authenticator
google-authenticator -t -d -f -r 3 -R 30 -W

Afterwards you’re probably going to have to resize the Terminal window so that the QR code is rendered correctly. Unfortunately, it’s just slightly wider than the standard 80 characters across.

The QR code generated by google-authenticator. Don’t worry, this isn’t the QR code for my key; I generated one just for this post that I didn’t use.

Don’t move forward quite yet! Before you do anything else you should copy the emergency codes and put them somewhere safe.

These codes will let you access your Raspberry Pi — and turn off 2FA — if you lose your phone. Without them, you won’t be able to SSH into your Raspberry Pi if you lose or break the device you’re using to authenticate.

Next, before we continue with Google Authenticator on the Raspberry Pi, open the Google Authenticator app on your phone and tap the plus sign (+) at the top right, then tap on “Scan barcode.”

Your phone will ask you whether you want to allow the app access to your camera; you should say “Yes.” The camera view will open. Position the barcode squarely in the green box on the screen.

Scanning the QR code with the Google Authenticator app.

As soon as your phone app recognises the QR code it will add your new account, and it will start generating TOTP codes automatically.

The TOTP in Google Authenticator app.

Your phone will generate a new one-time password every thirty seconds. However, this code isn’t going to be all that useful until we finish what we were doing on your Raspberry Pi. Switch back to your terminal window and answer “Y” when asked whether Google Authenticator should update your .google_authenticator file.

Then answer “Y” to disallow multiple uses of the same authentication token, “N” to increasing the time skew window, and “Y” to rate limiting in order to protect against brute-force attacks.

You’re done here. Now all we have to do is enable 2FA.

Enabling two-factor authentication

We’re going to use Linux Pluggable Authentication Modules (PAM), which provides dynamic authentication support for applications and services, to add 2FA to SSH on Raspberry Pi.

Now we need to configure PAM to add 2FA:

$ sudo nano /etc/pam.d/sshd

Add auth required pam_google_authenticator.so to the top of the file. You can do this either above or below the line that says @include common-auth.

Editing /etc/pam.d/sshd.

As I prefer to be prompted for my verification code after entering my password, I’ve added this line after the @include line. If you want to be prompted for the code before entering your password you should add it before the @include line.

Now restart the SSH daemon:

$ sudo systemctl restart ssh

Next, open up a terminal window on your laptop and try and SSH into your Raspberry Pi.

Wrapping things up

If everything has gone to plan, when you SSH into the Raspberry Pi, you should be prompted for a TOTP after being prompted for your password.

SSH’ing into my Raspberry Pi.

You should go ahead and open Google Authenticator on your phone, and enter the six-digit code when prompted. Then you should be logged into your Raspberry Pi as normal.

You’ll now need your phone, and a TOTP, every time you ssh into, or scp to and from, your Raspberry Pi. But because of that, you’ve just given a huge boost to the security of your device.

Now you have the Google Authenticator app on your phone, you should probably start enabling 2FA for your important services and sites — like Google, Twitter, Amazon, and others — since most bigger sites, and many smaller ones, now support two-factor authentication.

Raspberry Pi High Quality Camera

posted May 5, 2020, 2:11 PM by Chris G   [ updated May 5, 2020, 2:11 PM ]

Raspberry Pi High Quality Camera

12.3 megapixel Sony IMX477 sensor, 7.9mm diagonal image size, and back-illuminated sensor architecture, with adjustable back focus and support for C- and CS-mount lenses

Interchangeable lenses

The High Quality Camera is designed to accept CS-mount lenses and, with the supplied adapter, C-mount lenses. The CGL 6 mm CS-mount and 16 mm C-mount lenses are examples of third-party products that are compatible with the High Quality Camera; see step-by-step instructions for fitting these CS-mount and C-mount lenses.

Operating instructions

For a guide to getting your camera up and running, including back focus adjustmenttripod mountingconnecting your camera to a Raspberry Pi computer, and operating camera software in Raspbian to capture images, see our online Getting started guide.

Pi Zero Face Recognition

posted Apr 25, 2019, 3:58 PM by Chris G   [ updated Apr 25, 2019, 3:58 PM ]

Face Recognition Raspberry Pi Zero Party Greeter

Building a face recognition system to recognize the faces of my friends and welcome them to a party.

There are a few ways of building a system like this. Possibly the simplest approach is using this library – https://github.com/ageitgey/face_recognition that is built on Built using dlib's state-of-the-art face recognition built with deep learning.. I’m using a Raspberry Pi Zero W with the Pi Zero Camera for the face recognition and a cheap Bluetooth module and speaker to announce friends with a greeting when a face is recognized. If the face is known to the system than the person's name is included in the greeting.

Read the full article at:

How To Disable The Red LED On The Pi Camera Module

posted Dec 17, 2018, 8:35 AM by Chris G   [ updated Dec 17, 2018, 8:36 AM ]

The Pi camera module includes a red LED in one corner of the PCB. This lights up when the camera is active. It’s really useful in giving a visual indication that the camera is doing something and most of the time you will be glad it is there.

However there are a number of reasons you might wish it wasn’t.

To disable the red LED you simply need to add the following line to your config.txt file :


To edit the config.txt file you can use Nano :

sudo nano /boot/config.txt

python picamera motion detection

posted Dec 5, 2018, 6:38 PM by Chris G   [ updated Dec 5, 2018, 6:38 PM ]

A simple example of using the Raspberry Pi Camera Module and python picamera for motion detection without any additional dependencies.


1-10 of 40