New domain and blog

New domain and blog
Please head over to my new domain to view my blog and current projects

Thursday, 27 September 2012

Raspberry Pi: Changing time zones

By default the time zone on the Raspberry Pi image is set the the UK. As there is no RTC on the Raspberry Pi, when ever it is turned on, the time is synced. To set the time zone to your local area, in my case South Africa, the configuration of the tzdata package needs to be changed.

sudo dpkg-reconfigure tzdata


Select your territory.


Then select your local time zone.


As you can see the time zone has now been changed.

Greg

Monday, 10 September 2012

Raspberry Pi: Using Bottlypy to control GPIO

I have been trying for a few days now to get control over the GPIO pins through a webserver. There are a number of tutorials on the web but having very little web programming experience, I struggled to understand and follow the tutorials. 

After working through a number of examples, and not getting what I want, I came across the bottlepy framework. The tutorial on their website and the todo example show enough ways on how to get data to an html page and how to get data from an HTML page.

I have been super busy at work and also trying to get it to work so haven't had a chance yet to do a bit of an explanation on what I did.

To download the files I used click here.

You will need to edit your IP address in the index.py file.

Change to the directory on your Raspberry Pi and run $ python3 index.py

In your browser navigate to IPaddress:8080/index then follow the links. Have a look in index.py to see what pins I have used for the inputs and outputs.

Sorry this is so vague but as soon as I get a chance I will update this post with some more explanations.

Greg