Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# Reads the anemometer "Holdpeak HP-866A" from USB port
# Time stamp in unix time and windspeed in m/s is output
require 'rubyserial'
if ARGV.length != 1
$stderr.puts "usage: read_anemometer.rb <tty device>"
exit(-1)