Real-time Weather with Flash and Java

January 22nd, 2010 by Rob
1-Wire Weather Station

1-Wire Weather Station

This is a real-time weather station I built using an AAG electronica instrument and an EEE 701 for the server.

I coded the server in Java using Apache’s Mina library for non-blocking sockets. The client is FLEX, and uses Socket (rather than HTTP). The webcam service consists essentially of a Java class that reads the video4linux data as raw RGB and saves it to a JPEG which is then streamed over the socket along with all the other data (I built the server to be pluggable, so each of these little add-ons is a plugin that shares the stream with the other plugins). The archival data lives in MySQL.

I’ve more or less lost interest in this project so it’s not pretty, but on windy days, it is fairly enjoyable to watch! The server itself can be used for just about anything, from a weather station, to a GPS satellite tracker, to the user map that adorns the top-left corner of this site.