abloom / arduino_messaging

Random experiments with my Ardunio and some Nixie tubes

This URL has Read+Write access

arduino_messaging / http_push.rb
100755 19 lines (15 sloc) 0.26 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/ruby
 
require 'socket'
 
puts "Opening Socket"
sock = TCPSocket.new("10.0.0.20", 23)
 
begin
  while
    $stdout.write "brightness: "
    msg = gets()
    sock.write(msg)
    puts "sent: #{msg}"
  end
ensure
  puts "\nClosing Socket"
  sock.close
end