require "al_worker" require "al_worker_timer" require "i2c" require "net/http" require "uri" require "json" ... POST_URI = "http://192.168.1.11/cgi-bin/index.rb?ctrl=data_post" ... def send_data( data ) AlWorker.log( data ) Net::HTTP.post_form(URI.parse(POST_URI), {"data"=>data.to_json}) end