Adding the code from Strawberry Pi.