The Raspberry Pi has a built in hardware watchdog timer.
For Raspbian
To load the watchdog kernel module right now, issue the following command:
$ sudo modprobe bcm2708_wdog
Load the module the next time the system boots, add a line to your /etc/modules file with "bcm2708_wdog". The -a option makes sure tee appends instead.
$ echo "bcm2708_wdog" | sudo tee -a /etc/modules
Open /etc/watchdog.conf with your favorite editor
$ sudo nano /etc/watchdog.conf
Uncomment the line that starts with #watchdog-device by removing the hash (#) to enable the watchdog daemon to use the watchdog device.
Uncomment the line that says #max-load-1 = 24 by removing the hash symbol to reboot the device if the load goes over 24 over 1 minute. A load of 25 of one minute means that you would have needed 25 Raspberry Pis to complete that task in 1 minute. You may tweak this value to your liking.
Install chkconfig if you don't already have it
$ sudo apt-get install chkconfig
$ sudo chkconfig watchdog on
You can test it by doing a fork bomb in the console.
:(){ :|:& };:
This is the professional way of restarting any kind of hardware or listening for certain events. You can even use the watchdog to start certain scripts based on the data you are gettings. Like high wind speeds can send you warning email or something ...
Source