Category Archives: Raspberry Pi Coding

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

Ensure the Latest Node.js on Your Raspberry Pi

This is just a quick tutorial explaining how you can install the latest version of Node.js on your Raspberry Pi.

Using OpenCV with the Raspberry Pi Camera

OpenCV RasPi CSI Camera
OpenCV doesn’t work natively with the Rasperry Pi Camera as it is not a usb-webcam. That said, the applications such as raspivid or raspistill controls the Raspberry Pi Camera using MMAL Functions. So the one needs to modify the source code of these applications, by using the Buffer Memory of the Raspberry Pi Camera Board to be feed to OpenCV as Image Objects.

Connecting an Arduino to a Raspberry PI using I2C

Raspberry Pi connected to Arduino via I2C
I’m intending to use several Arduino Boards as a cheap means of controlling a number of RFID Readers which will be used to detect the position of Locomotive Engines on my LEGO Train Layout. That said I need a way of connecting these Arduinos to the Raspberry Pi which is the Master Controller for the layout.
The easiest way of Connecting an Arduino to a Raspberry PI is using USB, however the PI’s USB ports are need for WiFi Keyboard, Mouse, etc. So in many cases USB is out, especially if you are using a Raspberry Pi Model ‘A’.



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