Created
January 7, 2010 04:18
-
-
Save kitplummer/270979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# For accessing Go!Temp probe from Ruby on Linux | |
f = File.new("/dev/ldusb0") | |
packet = f.read(8) | |
parsed_packet = packet.unpack('ccsss') | |
puts "temp: #{(parsed_packet[2]/128).to_s}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment