Nine handpicked projects for the Raspberry Pi

Speed Camera

Another application that integrates a camera comes from Canadian Claude Pageau. Speed Camera (Figure 3) is a Python program that uses the Open Source Computer Vision Library (OpenCV) to track the largest moving object in a camera's field of view and determine its speed and direction.

Figure 3: The Speed Camera dashboard.

Speed Camera [13] records an image and optionally saves the data in a CSV file for later processing. If the traffic in front of the camera constantly exceeds the permitted speed, it can be recorded with this inexpensive solution. One field of application is sports – for example, to measure the speeds of runners or cyclists.

The software runs on Unix-based systems, Windows, and the Raspberry Pi and offers plugins for webcams as well as the Raspberry Pi camera module. A year ago, the project introduced the option of viewing stored CSV data and the corresponding images in a browser on the LAN. The developers have integrated a menu system, the makehtml converter, and a web server.

Developer Pageau recommends at least a Raspberry Pi 2, because it has a quad-core CPU that performs better with threading.

Voice Kit

Google AIY stands for "do-it-yourself artificial intelligence." The project currently comprises two kits. Vision Kit uses a camera and the TensorFlow deep learning framework to detect objects, and the second AIY project kit discussed here, Voice Kit [14], supports natural speech recognition.

Anyone interested in doing so can turn a Raspberry Pi 3 (RPi3) into a Google Assistant in less than an hour. Beyond what the Google Assistant SDK already does, custom question-and-answer pairs are also possible. All of this fits in a handy cardboard cube containing a Raspberry Pi and a loudspeaker to help the Pi talk.

Besides an RPi3 and an SD card with a Voice Kit SD image [15], you need the Voice Kit itself ($10-$50, EUR27) [16]. In addition to the box, a speaker, and all necessary connection cables, the kit contains two expansion boards, the Voice HAT, and the Voice HAT microphone. The assembly procedure is well documented [17] and requires only a screwdriver. For makers and hackers, the maker's guide [18] provides source code and API references, as well as instructions for integrating additional sensors.

Cluster with Docker Swarm

Usually one Raspberry Pi is enough to realize a project, but some scenarios require concentrated computing power, where it makes sense to use a Pi cluster.

The described project [19] will work with just four Pis (Figure 4), with Docker Swarm [20] to manage them. Of course, far larger clusters can be built. Container specialist Resin built a Pi cluster known as The Beast with 144 boards and is currently working on an even larger model [21]. The cluster at the Free University of Bozen-Bolzano has no fewer than 300 Raspberry Pis.

Figure 4: Raspberry Pis installed in a cluster. © howchoo.com

Docker Swarm is not the only option for running Pi clusters. Kubernetes or Mesos Marathon are also suitable for this task. Unlike other solutions, though, Docker Swarm is already in place after installing Docker.

Initially, handling a small project is easier and the more sensible option for hobbyists. Joseph Tyler Jones, the developer of the howchoo maker platform, described the project. The simplest way to build a small tower with four RPi3 boards is to connect boards with inexpensive spacers in M2.5 format.

Jones used an ordinary Debian-based Raspbian operating system, to which you then need to add Docker. You then add the four boards to a Docker swarm via SSH, with the first node acting as the manager at the same time.

The first service Jones implements graphically displays the four nodes and tells you which containers they host. Additional services packed in containers can then easily be added to the setup and managed.

Raspberry Pi clusters are suitable not just for hobbyists and universities but also have applications in industry – especially in the field of metrology and control.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Pi-hole

    Supporting browser plug-ins, network-based DNS blockers like Pi-hole help protect you against online tracking and unwanted content.

  • The sysadmin's daily grind: Pi-hole

    A strange rule seems to dictate that the most useless products and services have the most annoying online advertising. Columnist Charly blocks the garish advertising for all computers on his network centrally with the Pi-hole tool, which is not only for Raspberry Pi devices.

  • Privacy Appliances

    A Raspberry Pi with the right software filters out annoying ads and nasty trackers for end devices on your local network.

  • Mistborn

    Mistborn bundles important Internet services on your home network and secures them with a WireGuard VPN tunnel, Pi-hole, iptables rules, and separate containers.

  • Docker Open Source Developer Tools

    Docker provides the open source tools and resources for compiling, building, and testing containerized applications.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News