Friday, 30 March 2012

Wireless sensor node - software (15)

My home wireless sensor network has now been operational for just over a week. It currently only consists of two nodes.

A base station.


A single wireless RF sensor.


In my last post I was concentrating on getting the base station constructed and deployed. Since then I have been focusing on enhancing the software which runs on the base station and the software which I am currently running on my own PC to download the temperature readings. 

The base station exposes a command driven interface over Bluetooth. The long term plan is to use a raspberry pi to download readings in real time. However, in the mean time I have programmed the base station to write readings to file every hour. These files are read over the base station command interface by my desktop application. 
 
The Bluetooth interface currently accepts all of the following commands (along with some other debug related commands):
  • set_time_<n> - this allows the real time to be set on the base station. No readings are recorded until this has been set.
  • ls - List the files in the root of the SD card.
  • cat <file> - Return the contents of a file.
  • rm <file> - Delete a file.
  • rm * - Delete all the files.
These are issued by my desktop application to fetch all of the recorded data and graph it.


My intention is to upload these readings to https://pachube.com/ but I haven't got round to writing the code to do this yet.

The full code for my windows application is available here.