You should check out this post where I wrote some code for a pump controller with a web page interface: