Skip to content

Instantly share code, notes, and snippets.

@josefslerka
Created September 23, 2012 06:06
Show Gist options
  • Save josefslerka/3769046 to your computer and use it in GitHub Desktop.
Save josefslerka/3769046 to your computer and use it in GitHub Desktop.
The Internet - source code
require 'tweetstream'
require "serialport"
TweetStream.configure do |config|
config.consumer_key = 'xxxx'
config.consumer_secret = 'xxxx'
config.oauth_token = 'xxxx'
config.oauth_token_secret = 'xxxx'
config.auth_method = :oauth
end
sp = SerialPort.new "/dev/tty.usbserial-A700eYdU", 9600
TweetStream::Client.new.track('google','#hpcivilizace','@hpcivilizace','hyde parku','hyde park') do |status|
puts "#{status.text}"
sp.write "eweqweqwewqeq\r\n"
puts sp.read # hopefully "OK" ;-)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment