Skip to content

Instantly share code, notes, and snippets.

@kitplummer
Created January 7, 2010 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitplummer/270979 to your computer and use it in GitHub Desktop.
Save kitplummer/270979 to your computer and use it in GitHub Desktop.
#!/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