Category: Blog
-
Connecting to Raspberry Pi direct to PC via Ethernet
This article will show you how to connect directly to a Raspberry Pi by connecting an ethernet cable directly to your PC without needing to do any setup on the Raspberry Pi itself. This means you don’t need to plug a keyboard and monitor into your Pi to connect to it. Requirements: PC with ethernet…
-
C++ unique/shared ptr custom deleters
I’ve recently found the need for a custom deleter function attached to smart pointers in C++ and I found there are a number of different ways to implement this. I’ll touch on the advantages/disadvantages of the different ways to use custom deleters and the difference between unique and shared ptr. std::unique_ptr: The type of the…
-
Raspberry Pi/C++ Log Class
With having written many Raspberry Pi programs now, it made sense for me to create a little Log class which I’ve used in all my projects now which I feel is really quite nice to use and intuitive. In this post I’ll run through a few of its features. Source Code:Β https://github.com/comeradealexi/RaspberryPiShared One of the features…
-
Raspberry Pi – Home Monitoring System
Using multiple Raspberry Pis, I’ve put together a small system to monitor my home when away. In order to maintain my own privacy, I’ve set up a system which detects when myself or my partner is home by periodically pinging our phones IP addresses on the local WiFi network and disables recording/monitoring when either of…
-
Raspberry Pi – Web Controlled Media Player
Having a spare TV and a hard drive full of videos, I wanted to make it so I could easily watch videos from a hard drive on the TV and control playback and video choice entirely from my phone, this is what I set out to achieve with this project. The entire project can be…
-
lighttpd – Changing default user (Raspberry Pi)
After following the great tutorial here (http://www.penguintutor.com/linux/light-webserver) for getting lighttpd setup and running on my Raspberry Pi, I wanted to change the default user the service ran as so I could run commands from php scripts requiring more permissions. The part I got stuck on was that on a reboot, the folder in /var/run/lighttpd would…
-
std::mutex crash on initial lock (Interesting thread releated bug with fix included!)
Have been writing some code to test out creating worker threads in C++ and came across an interesting bug where my program would crash on the first lock of the mutex. Thought it was an interesting little problem to solve. Hint: Crash isn’t necessarily 100%… #include <stdio.h> #include <thread> #include <vector> #include <mutex> #include <atomic>…
-
Using Raspberry Pi to test Power Supply Reliability
I recently came across a problem with a friend whose computer was having strange issues of switching off entirely at random. We contacted the power supply support channels who suggested it sounded as if the surge protection on the motherboard was faulty, which I agreed with since in all my experience so far, I’ve never…
-
Problems with VisualGDB and Raspberry Pi 2
I followed the tutorial for setting up VisualGDB for a Raspberry Pi from this link:Β VisualGDB and below are some issues that I ran into and how I fixed them. Hope it helps! Compile Error: “bits/c++config.h: No such file or directory”: With this error, all you need to do is add the following include path to…