Musings of an aging computer nerd hitting 0x32
Day 3, Wilson's sore nose

Day 2, salt and pepper
Note: the only link in this post is now broken. Left as originally published.

Posh lamp stand

Office view Leeds

Ruby Script to send Twitter mentions over serial port
# Find your Twitter Mentions and send them to Arduino on Serial Portrequire “rubygems” require “twitter” #https://github.com/sferik/twitter for config details require “serialport” #http://rubygems.org/gems/serialport require “pp”
prevID = 0 puts “Setting Up Serial Port” myport = SerialPort.new("/dev/ttyACM0",“9600”.to_i) sleep(10) while true puts “Checking for mentions” latestMention = Twitter.mentions(:count => 1)[0] if prevID != latestMention.id msg = latestMention.user.screen_name + " " + latestMention.text puts “-” + msg bytes = myport.write(msg) puts “-” + bytes.to_s prevID = latestMention.id else puts “-No new updates” end sleep 60 end myport.close
Doodle’s Geek Monkey by Alastair Montgomery
Arduino LCD Message Scroller working
Here is the code (also at GitHub https://github.com/alastairhm/arduino.git)
// Auto scroll a message on the LCD and receive new messages via Serial port. // Alastair Montgomery (c) 2013 // Version 1.02 // include the library code: #include <LiquidCrystal.h> #include <string.h>// initialize the library with the numbers of the interface pins // below for SainSmart LCD Shield LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
Some Debug Required
Testing writing the same message from the Arduino IDE gives the same results so looks like problem is in the Arduino code. Maybe the message is too long for the LCD's buffer?
The Twitter to Serial port Ruby script can be found at https://github.com/alastairhm/arduino/tree/master/SerialMessage
Doodle's Geek Monkey by Alastair Montgomery
Ruby Script to get Twitter mentions
# Find your Twitter Mentionsrequire “rubygems” require “twitter” #https://github.com/sferik/twitter for config details require “pp”
prevID = 0 while true latestMention = Twitter.mentions(:count => 1)[0] if prevID != latestMention.id msg = latestMention.user.screen_name + " " + latestMention.text #puts msg.size puts msg prevID = latestMention.id else puts “No new updates” end sleep 60 end
Sending Arduino messages over serial port
Note: 1 of this post’s 6 links are now broken — mostly dead 2008–2013 feed-syndication infrastructure (FeedBurner, Gawker, AOL’s old blog network, Pheedo, Yahoo Pipes). Left as originally published.
Idea was to use it to display tweets, just need to write the Ruby code to get the tweet and send it over the serial port now.
Here is the first version of the sketch uploaded to the Arduino.
All code can be found at https://github.com/alastairhm/arduino.git
// Auto scroll a message on the LCD and receive new messages via Serial port. // Alastair Montgomery (c) 2013 // Version 1.00 // include the library code: #include <LiquidCrystal.h> #include <string.h>// initialize the library with the numbers of the interface pins // below for SainSmart LCD Shield LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
