Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (32 sloc) 0.894 kb
668664ca » aaronp
2006-07-10 updating documentation
1 = BetaBrite Examples
2
3 == Allocate Memory
4
577b3b32 » aaronp
2008-02-12 updating documentation
5 bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
6 sign.allocate do |memory|
7 memory.text('A', 4096)
8 memory.string('0', 64)
9 memory.dots('1', 7, 7)
10 end
11 end
12 bb.write_memory!
668664ca » aaronp
2006-07-10 updating documentation
13
14 == Reset the sign
15
577b3b32 » aaronp
2008-02-12 updating documentation
16 BetaBrite::Serial.new('/dev/ttyUSB0').clear_memory!
668664ca » aaronp
2006-07-10 updating documentation
17
18 == Write a text file
19
577b3b32 » aaronp
2008-02-12 updating documentation
20 bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
21 sign.textfile do
22 print left_arrow + string("Hello ").green
23 print string(" world.").green + sail_boat
24 end
25 end
26 bb.write!
668664ca » aaronp
2006-07-10 updating documentation
27
28 == Write a text file that references a string file
29
577b3b32 » aaronp
2008-02-12 updating documentation
30 bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
31 sign.stringfile('0') do
32 print string("cruel").red
33 end
34
35 sign.textfile do
36 print left_arrow + string("Hello ").green
37 print stringfile("0")
38 print string(" world.").green + sail_boat
39 end
40 end
41 bb.write!
Something went wrong with that request. Please try again.