I am trying to correctly wire an rgb adressable ledstrip. In a successive blog post, I will make it smart as my goal is to control the lights via Home Assistant, depending on triggers.
Hardware required is the cheap WS2811. This ledstrip works on 12V and you can control every 3 leds (as one). I will wire it with both a Raspberry Pi Zero and an Esp8266. If you’re interested, read on!
Continue reading “Wire and control ledstrips with the esp8266”
Just like the previous 2 years, I was very happy to attend DroidconUK. This time it’s the anniversary edition as it was the tenth time.
These topics stood out and I’d like to share them with you:
Continue reading “What I learned @ DroidconUK 2018”
I am currently experimenting to create a cheap Plex Media Server running on a Raspberry Pi 3!
I am aiming to share my media to my chromecast and my smartphone. So that I can play my music everywhere or turn off my PC when watching a TV Show.
Continue reading “Using Plex Media Server on a Raspberry PI 3”
Since the Raspberry PI was introduced in 2012, it’s so much easier to build the Internet of Things! Connecting sensors and exposing the values they read, so much fun!
Time to get our hands dirty! In the coming months, I will stuff my house with sensors to gather data. Motion, temperature, barometric pressure and any other sensors I may come across?
Continue reading “Create a connected temperature sensor with a Raspberry PI”
My own cheat sheet for commands I often use. It’s a work in progress.
See CPU Temperature
List hard disks
sudo reboot -n
sudo shutdown -h now
Upgrade your installed packages
sudo apt-get update
sudo apt-get upgrade
See available disk space
It’s relatively easy to detect motion with a PIR sensor connected to your Raspberry pi’s GPIO.
This is merely an overview of how to write the python script. For more details on how to connect the sensor, read this.
Continue reading “Detect motion with a Raspberry PI”
What’s the best way to auto mount a usb drive or hard disk? What if the filesystem is ntfs?
To get a list of connected usb disks you can:
Continue reading “Mount a usb drive or hard disk on Raspbian”
While I agree that a Singleton shouldn’t be used to often, I do want to share my favourite way to implement the singleton pattern for reference.
public class Example
private static Example instance;
// this class cannot get instantiated
public static Example getInstance()
if (instance == null)
instance = new Example();
If you want to compare if plain old java objects have the same properties, it is easiest to override the equals method. This way, if you initialise objects on different places, you can be certain when comparing that they are the same.
We will show you how to do it with this simple class:
public class Insect
private int legs;
private int eyes;
private int colour;
private String sortName;
public boolean equals(Object o)
if (this == o)
if (o == null || this.getClass() != o.getClass())
final Insect that = (Insect) o;
if (this.legs != that.legs)
if (this.eyes != that.eyes)
if (this.colour != that.colour)
if (this.sortName != null ? (this.sortName != that.sortName) : (that.sortName != null))
public int hashCode()
int hash = super.hashCode();
hash = 14 * hash + this.legs;
hash = 14 * hash + this.eyes;
hash = 14 * hash + this.colour;
hash = 14 * hash + (this.sortName != null ? this.sortName.hashCode() : 0);
After visiting Microsoft Cloud Camp in Brussels last week I wanted to dive into android developing by using Microsoft Azure.
I wanted to store images on a storage account, and since I didn’t use Gradle or Maven, I had some issues getting it to work. In the end, this is quick guide how I did it.
On github you can find the Microsoft Azure Storage SDK for Android. I checked out the project information on the maven-repository. I had to download the com.fasterxml.jackson.core since that was a dependency I wasn’t yet using.
On the repository URL I found the azure-storage-android-0.3.1.aar file. You need to download it and open it with a ZIP client. The classes.jar file is the library you need to put in your libs folder. I renamed it to azure-storage-android-0.3.1.jar. I also put the azure-storage-android-0.3.1-sources.jar in the libs folder.
For uploading an image to a storage account, this is a code example. Remember to execute it in an Async Task!
The image object is returned after pushing it to an Azure Mobile Service and contains the sasQueryString to authorize the upload.
String FileRef = FILEPATH + FILENAME of the file.
String BaseUrl = "http://storageaccountX.blob.core.windows.net";
CloudBlobClient blobClient = new CloudBlobClient(new URI(BaseUrl);
String blobName = image.ResourceName;
URI uri = new URI(blobClient.getEndpoint().toString() + "/" + "containername" + "/" + blobName + "?" + image.SasQueryString);
CloudBlockBlob sasBlob = new CloudBlockBlob(uri, blobClient);
File fileReference = new File(FileRef);
sasBlob.upload(new FileInputStream(fileReference), fileReference.length());