Connect the environment with pachube
Pachube is a website that connects different sensors to the internet. It has an easy api. A lot of different webapps for graphing the collected data.
Now my weather data is in the cloud :-).
Pachube is a website that connects different sensors to the internet. It has an easy api. A lot of different webapps for graphing the collected data.
Now my weather data is in the cloud :-).
I added the weather graphs to the website. On the wl500g the graphs are generated with rrdtool and with lftp the graphs are uploaded to the server every hour.
lftp -c 'open -e "mirror -R $LOCALWEATHERDIR $WEBDIR" sftp://$WEBHOST/'
You can see them at Weather @ HACKLAB
The goal of this project is to create a program that generates all kinds mazes with different shapes (square, triangular). The program is written for the Palm, (palm IIIc color). The project is licensed under the GNU GPL.
triangular |
square |
Copyright (C) 2003 David Rasch
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
I'm programming a new version of Tessellation, this time it runs on the iPhone.
Learning Objective C and the Core Graphics API. And taking screenshots (Command-Shift-4, then space, then click a window)

Last year my old weatherstation was damaged by a storm. I bought a new ws-2307 weatherstation. It has wireless sensors and a nice lcd display.
Of course I hooked it up to the wl500g . I compiled the open2300 weathersoftware on the wl500g itself.
On the download page there is a python version. It has less functionality, but is easy to modify.
Connect your weatherstation (wx200) to the internet using the wl500g router.
Install with:
ipkg install kmod-usb-serial
ipkg install kmod-usb-serial-pl2303
Download the static wx200d package .
With these tools you can create nice weather graphs on your wl500g and upload the data to a 'real' server.
Upload the files to the wl500g. Connect the wx200 with the serial adapter to the wl500g
Load the modules
insmod usbserial.o insmod pl2303.o
Set the execute bit on the program
chmod u+x wxread wx200d wx200
Check if you get a signal of the weatherstation
wxread /dev/usb/tts/0
weird characters are displayed after about 30 seconds, press CTRL-C to stop the program
Start the wx200d program
wx200d -s /dev/usb/tts/0 -w tmp -b
Writes the ascii logs to the /tmp directory, if you don't have enough diskspace and don't want logfiles add
wx200d -s /dev/usb/tts/0 -w tmp -a -b
Put this line in the startup after the usb serial modules are loaded.
Display the current weather
wx200
Install cron, see macsat cron tutorial or openwrt tutorial
Display the current weather on one line without units in centigrades and hectopascal and no errors
#!/bin/sh
url="http://yoursite/scriptname"
query="`wx200 -ul --C --hpa -e| awk '{print "temp="$1"&humid="$3"&baro=" $7}'`"
options="-q -O /dev/null"
wget ${options} "${url}?${query}"
Get current weather from the wl500g. WARNING! Dont use it on a public server! It's not a secure script!!!
If you installed an webserver with cgi, you can link:
ln -s /usr/sbin/wx200 /www/cgi-bin/
And use the http://wl500g/cgi-bin/wx200 to get a simple weather report. You can tweak the arguments http://wl500g/cgi-bin/wx200?-h
Install rrdtool, see macsat rrdtool tutorial .
I edited the script from 'the macsat rrdtool tutorial'. It creates 2 more graphs for humidity and barometer. The rrd database is about 110K. I placed the file on the ramdisk. (faster read and write, then the flash memory)
Link the images (and or the html pages) in the www directory
ln -s /tmp/*.png /www
ln -s /tmp/*.html /www
Add the script the to crontab
*/5 * * * * /usr/sbin/wx200rrd.sh
If you want to compile wx200d yourself, there is a package in openwrt svn repository
Instructions
It is really easy to connect the arduino (with an usb connection) to the wl500g.
You need the following packages from openwrt: kmod-usb-serial, kmod-usb-serial-ftdi
Upload the Sketchbook -> Examples -> Communication -> PhysicalPixel onto the arduino on your normal computer.
Connect the arduino to the wl500g and load the modules (usbserial, ftdi_sio)
It will create a serial port at /dev/usb/tts/0 (could be a different number, use dmesg to see the log)
Turn off the led:
$ echo L > /dev/usb/tts/0
Turn on the led:
$ echo H > /dev/usb/tts/0
or use screen
$ screen /dev/usb/tts/0 9600