I just released a new version of the ruby BetaBrite sign library. It lets you control BetaBrite signs. You can write text, change the color, fonts, display images, and do a bunch of other stuff.
In celebration of this new release, I created a DRb server that lets you write to my BetaBrite sign and take a photo of it! Here is the code that will write “Seattle.rb” to my server and take a photo:
require 'drb'
require 'rubygems'
require 'betabrite'
DRb.start_service()
obj = DRbObject.new(nil, 'druby://eviladmins.org:9000')
File.open("out.jpg", 'wb') { |a|
a.write obj.write_simple("Seattle.rb")
}
Which took this photo:

How about writing a red string?
require 'drb'
require 'rubygems'
require 'betabrite'
DRb.start_service()
obj = DRbObject.new(nil, 'druby://eviladmins.org:9000')
s = BetaBrite::String.new("Seattle.rb") { |a| a.set_color "red" }
File.open("out.jpg", 'wb') { |a|
a.write obj.write(s)
}
Install it and try it out!
Amazing example of ‘ruby as glue’. Thanks for sharing! This means I can use your BetaBrite as visual feedback on the Red/Green status of program builds
}
deejay – Leicester, UK
Nice job! But to me it’s more impressive how you handle the connection to the cam.
I want one! Please point to a page where you can purhcase one!
I bought the sign from Sam’s club. You can get one too here.
for some reason it won’t let me write this and take a photo
xxXHoTaSiAnTeensXxx
what’s the deal?
Thanks for this library! I used it a while back to play with my BetaBrite. Also, I like the reflection effect you hacked in. Where can I get the code for that?
If you want reflection, just check out my “hardwood floor” hack.
Wow, great!
Thanks for the hackery. “piyokun” Now I gotta try it when there’s light. What’s your timezone?
How about a BetaBrite Prism? Color!
http://www.flickr.com/photos/drnic/256171377/
Flickr tag: betabrite
Great work
Cool server!
In 1st sample, It works with only ‘drb’ because the betabrite is in the server side.
require ‘drb’
obj = DRbObject.new_with_uri(“druby://eviladmins.org:9000″)
File.open(“out.jpg”, “wb”) { |a|
a.write obj.write_simple(“www.druby.org”)
}
BetaBriteサーバ…
よたらぼ経由、LEDパネルを操作するRubyのライブラリのサンプル的サーバを知りました。LEDパネルに文字を表示させてその様子をWebCamで画像として受け取れるものなんだけど、dRubyでサー…
Great stuff! How you handle the connection to the cam?
I fork another process (vidcat) that reads the image from the webcam.
def take_photo
synchronize do
IO.popen('/usr/bin/vidcat', 'rb') { |f| f.read }
end
end
[...] 1) Look here: http://tenderlovemaking.com/2006/09/28/new-ruby-betabrite-002/ [...]
[...] Je qualifierais ça d’un “truc de ouf”. Voilà Betabrite, une library ruby, qui vous permait d’afficher divers mots sur un panneau lumineux ! [...]
Great ! It must be really fun to stare at it all day, watching the messages coming up ! Keep it up as long as possible and share the stats ! Do you actually keep the JPEGs ? You should ! And then make collage of something fun with them….
Um, okay, people are commenting in DIFFERENT LANGUAGES, DUDE! Soon you’ll be dating Paris Hilton and then I’ll NEVER see you again.
Ahh! BetaBrite is not a permenant service?!!
Hi Aaron:
I’m working on a project whereby incoming e-mail will be filtered and sent to an LED sign like this one. Can you tell me what model of BetaBrite you used? I see that the Ruby code uses a serial port so I assume it’s the older model — the new Prism model uses USB. Have you tried this library with any other model?
Thanks,
Jason
Hi Jason,
It is an older model. I haven’t tried it with the new BetaBrite model because I haven’t had the money to buy one…. From what I can tell, the new one just sets up a USB serial interface, so all of my code should work with it, but I haven’t tried. I’m hoping to get a newer BetaBrite to try out before the next Ruby conference.
Aaron,
I recently got to know there was a ruby library to manipulate Betabrite. It is really great! Thank you for your efforts on this.
May I ask a question on the library? While I could display text files pretty easily with the help of your library, but could not find a way to display dots files… If you have simple samples to use dots files, could you make them available? Thank you.
Tami Takamiya
Hey Tami. If you look under the script directory of the gem, you should find some sample scripts. One of them called “dots_file.rb” is an example of writing dots files to the sign.
[...] LED signs for a hundred dollars or less. I specifically looked for BetaBrite after reading about a Ruby module specifically to talk to BetaBrite signs. A complete BetaBrite sign with all the needed accessories cost about $120 shipped. The sign [...]
Aaron, I have one of the “New” Beta Brites and I am trying to send messages to the sign. I am programmer that uses Delphi, I am having trouble sending messages. The BetaBrite now has a dll that you use to access the sign with the USB. Do you have a newer betabrite as yet? If so, maybe you can help me tackle this sign.
I have one of the new usb beta brites too. Unfortunately I don’t have windows, and Adaptive won’t open the spec so I can get a USB driver on linux or os x.
I’ve had some success getting the new USB sign working with Ruby on a Mac via libusb/ruby-usb. The Betabrite message protocol is the same, as far as I can tell, and I’m able to set Files on the device. However, when I send new messages, the device just goes blank. I can use the remote control to run the File, so I know it’s taking the changes that I’m sending over USB. I feel like I’m overlooking some sort of run command, but I didn’t see one in your Ruby library, nor in the protocol guide (http://www.ams-i.com/Pages/97088061.htm). It does seem reasonable to me that there would be a run file command though, since the operations are just updating files in the device’s memory. Did you encounter anything like this when working with the serial version?
Hey! Can you send a link to the driver you used to get the USB betabrite working? I haven’t been able to get it working, and if I could get a driver for it, I could much better answer your questions. Or even update the library!
No driver, just libusb (http://libusb.wiki.sourceforge.net/) and ruby-usb (http://raa.ruby-lang.org/project/ruby-usb/). I had some trouble getting libusb to work, so I ended up grabbing a binary from http://www.ellert.se/twain-sane/. I used USB Prober (from an OS X Dev Kit) to identify the device so I could send messages to it. Once you get a handle to the device, it’s pretty much the same as talking to a non-USB serial device.
Also, since my last post, I figured out what was wrong. I don’t yet know why, but the USB version chokes on ETX. I stopped sending that, and it started working.
If you’d like a look at the code I’ve written to tie it all together, I’d be happy to email it to you.
FYI, I had to do some monkey-patching to get the ‘betabrite’ gem to work with my 1040 series model, to fix the serial comm settings (http://www.780tech.com/betabrite). After lowering the baud rate, I was able to drop the sleeps as well, which sped up the loading process significantly. My patch:
module BetaBrite
class Serial
def write_memory!
sp = SerialPort.new(@serialport, 4800, 7, 1, SerialPort::EVEN)
memory_message.split(//).each{|chr| sp.write chr}
end
def write!
sp = SerialPort.new(@serialport, 4800, 7, 1, SerialPort::EVEN)
message.split(//).each{|chr| sp.write chr}
end
end
end
Would love to see this code on GitHub so I could just fork it. Anyway, great work, THANKS!