I picked up an USB Temperature Sensor on eBay a few weeks ago. Total cost just over 4 Euros. It would have been rude not to get one. It is a HIP TEMPer model from http://www.pcsensor.com/. They have a few mad products such as a three foot switch. I like it.
I took quite a while to actually arrive.
It arrived today, so I plugged it into a Windows XP machine and installed the software. Yep, worked fine. The software that comes with it is basically crap. The colour scheme is way ugly.
This is not a problem at all as I planned to use it on Linux. I wanted to be able to poll the device and pull a temperature reading off it, stick it in a mySql database and present the data via a PHP web page. Bob's your aunty.
After consulting Dr. Google for a while, I came across this site, that had what I was looking for. http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/
I downloaded the driver and ran it. Perfect, almost.
It ran in a loop with lots of other data being shown. The default executed in a debug mode.
So, I had a look at the source code. I am not a C programmer but it was easy to follow.
I changed a few settings, commented out a few lines, compiled and tested it. Wash, rinse and repeat.
After a very short period of time, I had what I wanted.
The program just reads once and outputs the temperature in centigrade.
Done.
Just the thing to use in a script and automate.
I think I will get a few more. Very cheap and useful. Brilliant piece of kit.
I use 1-wire sensors for a lot of my temperature measurements. This is another tool for the toolbox. This is all due to the Linux drivers provided by http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/.
He is the hero.
I have added an update to this blog - USB Temperature Sensor and Linux (Part 2) on 10/08/2012. Included come compiled code.
Subscribe to:
Post Comments (Atom)
Any change you could post the modified code?
ReplyDeleteI just bought two TEMPer's to but are not happy with the output of the software.
Regards
Bjorn
Hey Bjorn
ReplyDeleteNo problem. The source file is at the link below. temper.c
http://code.google.com/p/arduino-homeeasy-web-switch-transmitter/downloads/list
If you have any problems, give me a shout
Thanks
Gerard
For the life of me, I cannot get the driver to install/work; having very little experience with linux, I am not sure how to even install/run it - can you inform me on how to get this running.
ReplyDeleteHey Leylander
ReplyDeleteWhat flavour and version of Linux are you using?
The study of weather and weather forecasting is usually known as meteorology. A meteorologist spends years of life to study different aspects of the climate and they are pretty much capable of forecasting the weather with different devices. Barrackpore
ReplyDeleteThannks great post
ReplyDelete