Friday, 31 October 2014

PHP Image Creation on RaspberryPi

PHP can harness the power of the GD Graphic Library, allowing the generation and manipulation of images.


You can create images based upon simple lines, rectangles, arcs and circles, as well an manipulating existing graphics files.


So I recently took my first steps in creating images in PHP on a RaspberryPi.

Saturday, 25 October 2014

LibreCAD: "A picture is worth a thousand words"

While I'm not sure about the official exchange rate, it certainly helps to use both sketches and formal drawings to help understand concepts, and also to plan & execute projects.


Open source applications such as LibreOffice Draw and LibreCAD can be valuable tools when working on DIY projects.


I normally begin the planning process of a new home project with some kind of a sketch.

Friday, 10 October 2014

The New RaspberryPi B+

I feel like the last kid on the block to get one of these new Pi models.


But here are a few comments and observations on the latest product from the Raspberry Pi Foundation.


This is my 7th Pi which now includes models A, B rev 1, B rev 2 & B+.

Wednesday, 1 October 2014

RaspberryPi inputs: to poll or to interrupt?

One of the best features of the RaspberryPi is the GPIO (General Purpose Inputs & Outputs).


Reading the input levels on the GPIO is pretty easy, especially using Gordon's wiringPi library.


But you need to think carefully about how best to do this in the software for your chosen project.

Sunday, 14 September 2014

RaspberryPi Web server: GPIO access

Controlling the RaspberryPi GPIO remotely, over a network or across the internet, seems like an interesting trick.


I copied some code from the net and gave it a try, but unfortunately it didn't want to play.


So I went back to basics and created my own simple test routine.

Saturday, 30 August 2014

RaspberryPi + DS18B20 Temperature Sensor

The DS18B20 is a low cost, simple to use, 1-wire temperature sensor which is ideally suited for use with the Raspberry Pi.


Up to 10 of these sensors can be wired in parallel to a single Raspberry Pi GPIO pin, each giving a reasonably accurate indication of temperature.


The current Raspbian image includes support for these devices, so its quite easy to get them up and running.

Wednesday, 27 August 2014

The Linux /sys Directory & the ASUS Backlight

The /sys directory is a bit like the /proc virtual file system which I discussed in my last post.


Continuing the "everything is a file" approach, the /sys directory gives you access to many system components and their parameters.


My prime consideration is whether I can control the display backlight on my laptop.

Wednesday, 20 August 2014

The Linux /proc directory

Within the Linux file system there is an unusual directory.


It contains apparently empty (0 bytes) files, and includes several numbered sub-directories.


So what's that all about?

Tuesday, 12 August 2014

A Better "Automatic Light" Controller

This may be one of the most ridiculus, unnecessary projects I've ever got involved with.


But sometimes when an idea takes hold, it becomes difficult to shake off.


The idea is to calculate sunset using a SINE function, and use this as the basis for controlling an outside light!