PHP 7 Object Properties Type Safety with Setters and Getters

PHP 7 introduces scalar type definitions: your function parameters can be of a given type, and function return type declarations ensuring your function will return results of a given data type. This can increase your code quality by enforcing a specific behaviour of your code, almost similar to how a strongly typed language does. However, PHP does not yet support variable or property data types – leaving the possibility of variables and properties to be unpredictably converted from one type to another within type safe functions. Below is a technique that enables you to guarantee object properties will always be of a given type.
Continue reading PHP 7 Object Properties Type Safety with Setters and Getters

Numato Lab 32 Channel USB Gpio NodeJS Module

Having played with the Raspberry PI GPIO interface for over a year, I thought I should explore options for a faster CPU/RAM and a different architecture to enable quicker device control and more complex software. The fastest option for controlling is using a standard PC and a standard CPU architecture.

Continue reading Numato Lab 32 Channel USB Gpio NodeJS Module

Control your Raspberry PI GPIO in Real Time via the Browser using NodeJS, Socket.IO and pi-gpio

Playing with my Raspberry PI and its GPIO over the weekend it occurred to me I would be able to control it in real time from a browser, using Socket.IO and pi-gpio.
Continue reading Control your Raspberry PI GPIO in Real Time via the Browser using NodeJS, Socket.IO and pi-gpio