Permalink
Browse files

updating docco

  • Loading branch information...
1 parent b6c4c80 commit 2eb94063b5cb217520ab4824b81b974467b06809 @tenderlove committed Aug 20, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 README.rdoc
View
13 README.rdoc
@@ -27,14 +27,15 @@ file displayed on the sign is labeled 'A'.
Here is an example of modifying the default sign text:
- bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
+ bb = BetaBrite::USB.new do |sign|
sign.textfile do
print ARGV[0]
end
end
bb.write!
== Autotest Support
+
Here is an example of a .autotest file using the BetaBrite module:
require 'betabrite/autotest'
@@ -48,13 +49,14 @@ You don't need to give the hook method a block, but you can if you'd like to
customize your messages.
== Allocating Memory
+
The memory in the BetaBrite sign should be configured before anything is
written to it. You only have to configure the memory once before writing to
-it. So subsequent executions of your script do not require allocating memory.
+it. Subsequent executions of your script do not require allocating memory.
Here is an example of allocating memory on the sign:
- bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
+ bb = BetaBrite::USB.new do |sign|
sign.allocate do |memory|
memory.text('A', 4096)
memory.string('0', 64)
@@ -65,21 +67,24 @@ Here is an example of allocating memory on the sign:
For more examples, see the EXAMPLES file.
== Different File Types
+
=== Text Files
+
The data stored in a text file is not supposed to change frequently. If the
data in a text file is changed, the sign will go blank before anything is
displayed. This is not good for applications like a stock ticker which
update data quite frequently. This problem can be avoided by having the
text file reference more volitile files like String Files.
=== String Files
+
String files contain more volitile memory. The contents of a String File
can be changed without the screen going blank. String Files, however, cannot
be displayed unless referenced from a Text File.
Here is an example of referencing a String File from a Text File:
- bb = BetaBrite::Serial.new('/dev/ttyUSB0') do |sign|
+ bb = BetaBrite::USB.new do |sign|
sign.stringfile('0') do
print string("cruel").red
end

0 comments on commit 2eb9406

Please sign in to comment.