Skip to content

Instantly share code, notes, and snippets.

@ucnv
Created April 2, 2010 18:53
Show Gist options
  • Save ucnv/353541 to your computer and use it in GitHub Desktop.
Save ucnv/353541 to your computer and use it in GitHub Desktop.
require 'ubygems'
require 'open-uri'
url = ARGV.first || 'http://webcam02.surfcity-hb.org/-wvhttp-01-/'
`open "#{url}getoneshot?v=160&frame_count=0"`
Signal.trap(:INT) { exit }
while(1) do
p = rand(340) - 170
t = rand(180) - 90
z = rand(45) + 3
# p 'pan: %d, tilt: %d, zoom: %d' % [p,t,z]
open "#{url}GetStillImage?p=#{p}&t=#{t}&z=#{z}&v=160"
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment