• Tontec Touch Screen Set Up

    Setting up Tontec Touch Screen for the Raspberry Pi.

  • Weewx on Rasp!

    Installing Weewx and a La Crosse WS2350 Weather Station on a Raspberry Pi (RPi)

  • Arduino Capacitive Switches

    When I saw this Arduino capacitive switching demoed at UWE, Bristol I was sold on the little board. Pinball with paper clips and Maltesers!

  • Windguru Plugins

    Wordpress and Joomla Plugins for Windguru

  • Weewx QNAP
  • Which Winch?
  • Stoves for Woodlands, Bushcraft and Wildcamping.

    Buying a stove for your woodland or camping expeditions can be daunting with a vast selection on the market and strong opinions on the forums. Here’s my take on it.

  • Film Society

    In the bygone days videos and films were rented from shops on reflective pieces of plastic and magnetic rolls of ribbon. This is a software development task and an implementation task. (Taken from OCR 2507 Task 1 Jun 2006)

  • Magic 8 Ball

    The Magic 8 Ball is a toy used for fortune-telling or seeking advice, manufactured by Mattel and developed in the 1950s. Often used in fiction and for humour related to it giving very accurate, very inaccurate, or otherwise statistically improbable.

  • Dog Year Calculator

    Dogs do not age at the same rate as humans. Write a program that converts the age of a dog to the equivalent for a human.

  • Etch A Sketch

    Write a Etch A Sketch program that recreates the popular 70s/80s Etch A Sketch toy.

  • Cellular Automata

    A cellular automaton is a collection of “colored” cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules based on the states of neighboring cells.

A Digital Ranch amongst the Wild Web

Ex-teacher & sound engineer. Now #Smallholder and #Woodsman working in Property and Electrical Installations. Into all things #STEM; #getoutside to walk, kitesurf and cycle.

Having purchased a Tontec Touch Screen (Model MZ61581) for the Raspberry Pi from Amazon I went about following the instructions found via the product description.  These instructions are what I used for the Raspberry Pi 2 (or Model B+).   I was using the 2015-05-05 version of raspbian-wheezy.

My screen was installed as below



***The unmodified instruction file can be downloaded at https://s3.amazonaws.com/ttbox/35screen.zip

1.     Initial Config of New Raspberry Pi Install

After booting your Raspberry Pi for the first time on Raspbian-Wheezy, we will need to perform the normal tasks of setting up our Raspberry Pi. including: expanding the filesystem; and setting the timezone.

You also need to set the date correctly as otherwise the rpi-update command in step 3 will error with tar timestamp is in the future.  The following instructions taken from this Stack Exchange Post explain what we need to do:

Go to http://support.ntp.org/bin/view/Servers/NTPPoolServers, select your region, then your country and a list of servers will be display.  Now edit your /etc/ntp.conf file e.g.

Replace the list of servers with the one you found in the webpage. e.g.

Save and exit.

Before restarting the ntp deamon I would advise setting your time manually to a time close to the current time.  Apparently if the pi time is too different to ntp time it will not sync and my investigations seem to support this.

check that the date is correct.  There maybe some delay in it setting and you could also reboot.

2. Update and upgrade the Raspberry Pi Install

Then we need “update” and “upgrade”.  If you want to learn more about the update, upgrade and rpi-update process read Michael’s post on the subject.

3.    Update Firmware

We now need to update our firmware to the newest version to support Tontec screen.   Check that your date  is correct (step 1) before starting this process.

My first attempts failed with a white screen on the Tontec.  Further investigation via the main HDMI showed that the boot sequence was freezing on fbtft_register_backlight:


(Edit) This is actually normal behaviour and once the Tontec screen was working the main screen still froze at this point. I contacted iTonTec support and they suggested running

instead of the plain rpi-update, which appeared to make the difference.

4.     Enable SPI and set overlay for Tontec MZ61581 Screen

Open Raspi-Config and set the following on:

  • Auto boot to X Windows
  • SPI is turned on (advanced settings)
  • I2C is turned on (advanced settings)

Thanks to the amazon commenters for this as it was missing from the user guide.

Open /boot/config.txt

And add these lines to the bottom

Then save and reboot

4.     Set Tontec 3.5 Screen as the default display instead of HDMI

Here we will change the default output display from HDMI to Tontec Screen



Note: if you want to switch back to the HDMI display, just change it back to fb0

5.     Edit cmdline.txt

Here we will enable Tontec Screen to display during the booting process


at the end of current line. (No need to start a new line)

6.     Reboot


Touch Calibration (optional)

If you need to calibrate the touchscreen for X, Please download the instruction at http://s3.amazonaws.com/ttbox/35calibrate.zip

This was my backup installation for Weewx and a La Crosse WS2350 Weather Station on a Raspberry Pi (RPi) after I suffered Python library problems with our Synology box.   It is assumed  you are running headless (no mouse, keyboard or monitor on the RPi) and have installed an SSH client on your main machine.

Getting Started

I started by getting a fresh version of the Raspbian OS from the Raspberry Pi website and then used the dd tools on my Mac to image the card.  On the Weewx Google group there is a discussion on the life expectancy of card on the RPi and I would suggest taking an image of the card once you have everything set up should it fail.  It would also be worth setting up some form of scp/rsync to copy your databases to a remote backup.  You should also read the Raspberry Pi section of the Weewx website before starting.

Once you have plugged your RPi to the network and powered it up you will need to find it on your network.  If you are using a linux based computer as your main machine then you can use something like

but windows will need some software like Advanced IP Scanner (untested).

I started by creating a new user for Weewx and added them to the superusers group so I have greater control over what the weather station can do.

Installing the Prerequisites

next I, patiently, worked through installing all the prerequisites.

If you are installing Weewx onto the latest version of Raspbian then NTP is already installed.  You can check this by checking the existence of the config file

and then checking that the correct time has been set with

if you get output that looks like Tue Dec 31 08:45:45 UTC 2013 then the time is set.

Installing and configuring Weewx.

Caveat from M:

Installation using the deb package is probably easier for most people with little linux experience.  when you install using a deb package, dpkg will prompt for the altitude, lat/lon, station type, and any other required parameters.  so there is little or no puzzling with config files when you install from deb package, at least for a generic installation.

However, for a manual or custom installation read on…


So download the latest version of Weewx onto your RPi and unzip it with

Next set the install path so weewx does not run in the home folder of the weewx user by opening the setup.cfg file with nano setup.cfg

with this done we can build the install (checking for errors) before running the install itself.


If everything has gone to plan and Weewx has been installed into /homes/weewx/system25 we can now start configuring and running Weewx.  You will want to configure: location; latitude; longitude; altitude; and station_type.  This can all be done using vi or another text editor

Notes on station configuration

At the time of writing my station type (Technoline branded La Cross WS2350) was in Beta so I had to add WS23xx support manually.   If you are working with version 2.5.1 or greater then you should be able to skip steps 1 to 3 and jump straight to 4.

1) download the ws23xx.py driver and the wee_config_ws23xx utility:

2) put the two files in the right place, set permissions on the utility:

3) add the ws23xx directives in weewx.conf:

4)  Check/ Update station interval.

When my reports first started to run I was getting dots and not lines as shown in the first part of the image.  This was due the station interval time being set at 60 minutes.


If you are seeing something similar then you can check the station configuration and the hardware archive interval (‘hi’) using:

you can set this interval with

and now you should have a working station.

Another caveat from M:

Another way to deal with the dots is to change the line_gap_fraction in skin.conf.  some people might want to keep a long archive interval.  for example, a long interval makes it possible to do weekly synchronization to stations with little memory.  others simply do not need ‘live’ or even 5 minute updates of the data.  reducing the value of line_gap_fraction will connect the dots without increasing the number of samples.


Now plug your station in to the RPi and check that is has loaded ok with the following command and you should see a listing for ttyUSB0

Depending on which user you intend to run the station as you might need to change the permissions of this file.

although sadly unless you set up udev rules you might have to repeat this every time you unplug/replug the weather station.

Finally you can get down to running the station with

or if you want it to continue after you have logged off via SSH you will need to use nohup as shown below.

this starts weewxd and then stores the pid in a file called run.pid for later when we would like to kill (stop) the weather station from running.  We can check that the station is still running with

and now kill/stop it with

Viewing the output

You will be able to view output created on the RPi first by listing the contents of the public_html folder which is created inside your weewx system folder at the correct interval.

If you are playing with templates and have problems seeing updates I have had success deleting the public_html and starting over.   Weewx will only create some first the first time so without the folder it starts over.

Assuming that folder exists you will want a web server to view those file.   If you already have web space available then the easiest solution is to refer to the FTP section of the standard reporting section of the weewx.conf.  You will need to restart weewxd if you make changes there.

If you want to install a webserver on the Raspberry Pi you start by getting the main apache package.  As we are only viewing static pages there is no need for php or anything else.

Once this installation has completed you should be able to browse to the ip address of the RPi and see the standard it works! webpage.  The easiest way to then view your actual weather pages is to create a link from the webroot to your weewx public_html folder:

and then it should work!

In this experiment I am going to use my first outside library to add Capacitive Sensing to the Arduino as demonstrated on You Tube.   This is the same technique used by most modern touch screen such as the iPad and iPhone and this feature is brought to the Arduino via the CapSense library written by Paul Badger.

Read More

Our Joomla Windguru Plugin and WordPress Windguru Plugin  now provide the official support of the Windguru Plugin inside Joomla and WordPress.  After much waiting I found time to double check the Joomla and WordPress versions; tweak my class version of Vaclav’s plugin and get everything looking good on a products page.




Docker makes creating a weewx installation on a lieghtweight and non RPi computer much easier.   Start by creating a Ubuntu Docker container (not LXC although I’m certain it can be done this way!)

And set the network

Install the required packages. The -y stops an Error debconf: unable to initialize frontend: Dialog error because we are running headless.

Now grab the latest version of weewx.

Next expand and move into the source folder

Now build and install Weewx following the on-screen prompts.

Now we can set Weewx up as a daemon automatically when the computer starts:

Ubuntu Docker does not install the rsyslog by standard so we must do that. Finally you can check the logs.

Its probably high treason but I like nano over Vi or Vim and its required for the next step.

#And if you want to work across SSH then you’ll need the server too and will need to add a user to the system. I also find its useful to change the /home/weewx folder ownership to my SSH user.

If you are not sure the IP address allocated to the Docker images you can install Network tools which gives access to ifconfig

You may also need to install a webserver such as Apache (First Command) but to remove the ServerName error you must add it to the ServerName directive to the config.

I like to link to the web root. The penultimate command should show the simlink has been created and the final command will run the report service and should create the weewx files at the webserver root.

We have ended up with a number of winches over the last couple of years that all have their own pros/cons but did we make the right decision?

Truck Winch
+ Strong: Will pull 4 Tonnes
+ Effort: Doesn’t require strength.
– Location: Truck needs to be in location/position
– Expensive: Cost around ~£1K for a cheapish set up.
– Fixing: Requires some engineering skill to fit.

ATV Winch
+ Cheap:  They cost around £40.
– Limited Length: max 6m or 3m if doubled up for heavy loads.
– Capacity: They are only really designed for pulling quads so have limited strength.
– Fitting: Need a modified tractor or quad to fit one.

Lug-All Cable Winch
+ Lightweight: easy to carry around the wood.
+ Cheap: as far as winches go its not that expensive.
– Capacity: We have overloaded ours once pulling a large tree
– Limited Length: max 6m or 3m if doubled up for heavy loads.
– Handle Overload: The handle is designed to bend on overload costing ~£70 to replace.

Wire Rope Pulling Hoist (aka Trifor – other brands do exist including v. cheap knock offs.)
+ Capacity: different capacities are available. Ours is the 3200KG one.
+ Capability: It only pulls in 1.5″ at a stroke so its very capable and will just slowly drag/pull whatever is attached to it.
– Weight: Its so heavy and the wirerope is even heavier.
– Cost: The originals are expensive. There are cheaper ones around but watch for people claiming to sell one make whilst providing a cheaper alternative.
– Loading: Its not the easiest thing to load.

What would I buy again?

If I needed to start over I would probably end up with two winches:

  • Ace Trifor –  for those heavy heavy days.
  • Capstan Winch – for those longer lighter pulls. Because of how these work you are not limited on length so it would work really well for pulling light loads up slopes on a suitable trolley.

Writing a woodland management plan can be a daunting process and I remember when starting to write ours I had moments when I doubted myself.  I started asking myself questions such as: what should I say here; or is this what they are looking for?  I’m also aware that although the Forestry Commision (FC) are supposed to provide help, due to workloads and priorities, the amount of help they give is proportional to the size of your wood.  So if our 8 acre woodland allowed me to access a 40 minute phone conversation those with 3 acres are unlikely to glean much information or knowledge from a 15 minute conversation.

Anyway its not all doom and gloom.

Maybe you don’t need a Management Plan and/or Felling Licence.

Firstly remember you are able to chop down 5 cubic metres of wood every quarter (3 months) without a licence.  In their Timber Volume Calculator the FC provide a useful little table to help us figure out how many trees that actually is (see below).  And its also worth remembering that the 5m3/qtr does not include: trees under 8cm (as they are not considered a tree); standards under 10cm (if for thinning and/or improving neighbouring trees); and coppiced trees under 15cm.  All these diameters are taken at chest height.

Useful Publications

Secondly, there is a lot of useful information in the form of booklets and examples and we have been provided with templates we can use.   Below I have highlighted the ones I found most helpful:


Protected Species:

Apparently there are bats living across Warleigh Lane in the old quarries and therefore woods close to the road would need to take account of this in their management plans.  I found these documents when considering a different wood:

Management Plan:

If you are looking at creating open spaces in your wood you will need to consider the environmental impact and the following documents will aid you.

Specifically related to Felling Applications:

If you are undertaking operations in your woodland it would be prudent to complete an operational impact assessment (OSA):

We are not large commercial forestry operations

Lastly, I believe, given the size of our woods we are unlikely to get drawn across the coals for not writing a 100% perfect management plan or felling licence request.  Or this is my hope at least!