| Using the THUM with the Raspberry Pi Compiled binaries for ARMv6 Rasberry Pi platform Notes:  You must have a USB Hub with sufficient power available to power on the device for a reading.  "Reading failed" is a good general indicator of not sufficient power to the device. --You should copy thumctl and thumchk.pl to /usr/bin or /usr/local/bin --When using the thumctl command, you must use at least one switch. example:  thumctl -tIf you run thumctl without a switch, you will need to unplug/replug in the THUM to get it to start responding again.
 Required dependencies:  libhid, libusb-dev, libusb-0.1-4, libnet-smtpauth-perl
 Debian "Stretch" Notes
 - libhid has been replaced with libhidapi-libusb0 - which can be installed with apt-get install
 Debian Stretch has one version of the libusb-dev library installed:libusb-dev                            2:0.1.12-30                              armhf
 Debian Stretch has two versions of the libusb library installed:libusb-0.1-4:armhf                    2:0.1.12-30                               armhf    (installed using apt-get install)
 libusb-1.0-0:armhf                    2:1.0.21-1                                 armhf
 Debian Stretch has one version of the libnet-smtpauth-perl library installed using apt-get install:libnet-smtpauth-perl                  0.08-4                                     all
   Sample Output:
 root@raspberrypi:~# uname -a
 Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l
 GNU/Linux
 
 root@raspberrypi:~# tar -zxvf thum.pi.src.tar.gz
 thum-src/
 thum-src/THUM.c
 thum-src/thumchk.conf
 thum-src/libTHUM.so.1
 thum-src/thumctl.c
 thum-src/thumctl
 thum-src/Makefile
 thum-src/thumchk.pl
 thum-src/THUM.h
 thum-src/Makefile_thumctl
 thum-src/THUM.o
 
 root@raspberrypi:~# cd thum-src
 
 root@raspberrypi:~/thum-src# make all
 gcc -fPIC -g -c -Wall THUM.c
 THUM.c: In function GetVersion:
 THUM.c:1000:29: warning: operation on i may be undefined
 [-Wsequence-point]
 gcc -shared -Wl,-soname,libTHUM.so.1 -o libTHUM.so.1 THUM.o -lc -lm
 
 root@raspberrypi:~/thum-src# make install
 cp -f libTHUM.so.1 /usr/lib
 ln -sf /usr/lib/libTHUM.so.1 /usr/lib/libTHUM.so
 /sbin/ldconfig
 root@raspberrypi:~/thum-src# thumc
 thumchk.pl  thumctl
 
 root@raspberrypi:~/thum-src# thumctl
 1/26/2013 15:17:15 23.258900 C 27.625240 3.556923 C 1.000000 0.010000 C
 19.000000 1.000000
 
 root@raspberrypi:~# thumchk.pl -v -f -t -h
 Enabling verbose output
 Setting temperature unit to F
 Taking internal temperature reading
 Checking for THUM device at /dev/usb/hiddev0
 Found Practical Design Gr USB Temp/Humidity Sensor on /dev/usb/hiddev0
 Found THUM device at /dev/usb/hiddev0
 Taking relative humidity reading
 1/26/2013 15:23:06 74.712000 F 25.570978
 |