Category Archives: Python

Interfacing the Neo-6M GPS Module & Raspberry Pi with LCD Readout

One of the coolest embedded platforms like the Raspberry Pi has given makers and DIYers the ability to get location data easily using GPS module and thus build things that rely on location. With the amount of power packed by the Raspberry Pi, it certainly will be quite awesome to build GPS based projects with the same cheap GPS modules and that is the focus of this post. Today in this project we will Interface GPS module with Raspberry Pi 3.

The goal of this project is to collect location data (longitude and latitude) via UART from a GPS module and display them display on a 16×2 LCD, so if you are not familiar with the way the 16×2 LCD works with the Raspberry Pi, this is another great opportunity to learn.

Measuring Rotation and acceleration with the Raspberry Pi

MPU-6050 Module

Acceleration and rotation sensors are most known from smartphones. The rotation of the device can be detected and can be addressed directly.

With the Raspberry Pi and a Gyroscope / Accelerator sensor it is possible to measure the rotation as well as the acceleration of the 3 axes.
In this tutorial use the MPU 6050 Gyroscope / Accelerator sensor interferfaced to a Raspberry Pi, and reads the values using I2C.


For this tutorial I have used the following components:

  • Raspberry Pi
  • MPU 6050 sensor module
  • Jumper Cables

Make a “Safe Shutdown” Button for Raspberry Pi

Shutdown Button

Pulling the power to your Raspberry Pi can cause image corruptions & other issues that can damage your Pi! In this article, we will create a small push button that will work as a ‘Safe-Shutdown’ option. We’ll connect it to our Raspberry Pi using the GPIO pins and some jumper wires, and with a few lines of code, we will have our own power switch!

First, we are going to look at a simple way to wire a button to the Pi GPIO connector. We will then write a python script that will shut down the Pi safely. The final step will be to setup the Pi so that the button will work all the time. Let’s Get started!

Timelapse Photography with Raspberry Pi Zero


This tutorial will guide you through taking photos using a Pi Zero and camera, to make a simple timelapse-capturing device. Use it to make a timelapse of a plant growing with the delay set to a day, or the progress on your building work with hourly photos, or a soldering project with a photo every 5 seconds.

Enable the camera

This tutorial assumes you have already set up your OctoCam as per the instructions. If you’re using a camera and a Pi, make sure the camera is connected.

In the Terminal, type sudo raspi-config and press Enter. This will bring up a menu on the screen. You’ll need to press 5, then choose option 1 to enable the camera, and then choose yes. Once you finish with the menu you should get prompted to reboot. This needs doing!

WS2812 Addressable LEDs: Raspberry Pi Quick-start Guide

This tutorial is aimed at getting some instant gratification from your WS2812 LEDs (trade name: neopixels). I’ll briefly cover a bare-bones setup for Raspberry Pi.

If you’ve never used a Raspberry Pi before, we’ve got you covered with our free, online Raspberry Pi How-To’s.

Temperature Sensing With Raspberry Pi

The Raspberry Pi lacks analogue input, and while it’s possible to use an Analogue to Digital Converter (ADC), the DS18B20 is a fantastic, easy to use digital sensor that uses the Dallas 1 wire communication interface. Fortunately for us, the Raspberry Pi comes with built in software handling for 1 wire sensors which makes using sensors such as the DS18B20 pretty straightforward.

What is 1-Wire Communication

The Dallas 1-Wire protocol is a method of serial communication designed for simple communication between 1 Master and multiple Slave devices. Serial communication means that data is sent bit-by-bit along a single data line.

1 wire communication is most commonly used for temperature sensors, EEPROM chips, and other simple devices. Unlike other serial communication protocols such as I2C, which allows for device IDs/addresses to be assigned and handled by the master device, 1 wire devices have an unchangeable, factory set device ID. By differentiating between unique device IDs, you can chain multiple slave devices on a single data bus.

Using the ‘Google Cloud Vision API’ with your Raspberry Pi

What is the ‘Google Cloud Vision API’?

Google Cloud Vision API enables your robot to understand the content of an image by encapsulating powerful machine learning models in an easy to use REST API. It quickly classifies images into thousands of categories such as “robot”, “elephant”, “flower”. It detects individual objects and faces within images. It capable of finding and reading printed words contained within images, and even determines the language it is written in. You can use it to build metadata for your image collection, and can be used to moderate offensive content through image analysis.
The Vision API enables you to detect different types of inappropriate content from adult to violent content. It analyzes images uploaded by the request, or integrate with your image storage on Google Cloud Storage.

Using Flask to Control Raspberry Pi GPIOs

With this project you can create a standalone web server with a Raspberry Pi that can toggle two LEDs. You can replace those LEDs with any output (like a relay or a transistor). In order to create the web server you will be using a Python microframework called Flask.

Parts Required

Here’s the hardware that you need to complete this project:

  • Raspberry Pi (any Pi should work, I recommend using Raspberry Pi 3) – view on eBay
  • SD Card (minimum size 8Gb and class 10) – view on eBay
  • Micro USB Power Supply – view on eBay
  • Ethernet cable or WiFi dongle
  • Breaboard – view on eBay
  • 2x LEDs
  • 2x 470Ω Resistors
  • Jumper wires

Do NOT follow this link or you will be banned from the site!