Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (32 sloc) 0.894 kb
= BetaBrite Examples
== Allocate Memory
bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
sign.allocate do |memory|
memory.text('A', 4096)
memory.string('0', 64)
memory.dots('1', 7, 7)
end
end
bb.write_memory!
== Reset the sign
BetaBrite::Serial.new('/dev/ttyUSB0').clear_memory!
== Write a text file
bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
sign.textfile do
print left_arrow + string("Hello ").green
print string(" world.").green + sail_boat
end
end
bb.write!
== Write a text file that references a string file
bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
sign.stringfile('0') do
print string("cruel").red
end
sign.textfile do
print left_arrow + string("Hello ").green
print stringfile("0")
print string(" world.").green + sail_boat
end
end
bb.write!
Jump to Line
Something went wrong with that request. Please try again.