
29
roTouchScreen object. To create an object in a script, the CreateObject() function is
used.
Refer to the following two manuals when writing scripts:
• BrightSign HD600 BrightScript Reference -- this describes the actual scripting
language
• BrightSign HD600 Object Reference -- this describes the Roku Objects, such as
“roVideoPlayer”
Examples
A good way to learn BrightScript is to look at or modify existing scripts. You can find
links to example scripts at www.rokulabs.com/brightsign. The BrightSign Demo
“autorun.bas” is an example of a more sophisticated script.
You can also test BrightScript commands using the shell. Here is an example:
Welcome to the Roku Shell version 1.1.28 Release
Type '?' for help or 'help <command>' for help on <command>.
Roku> script
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
BrightScript> print "hello"
hello
BrightScript> ? "hello"
hello
BrightScript> ?5+6
11
BrightScript> ?type(5)
rotINT32
BrightScript> if 1=1 then print"1 does equal 1!" else print "strange!"
1 does equal 1!
BrightScript> ?right("abcdef",3)
def
BrightScript> exit
Roku>
GPIO Control Port
The BrightSign has a DB25 General Purpose Input Output (GPIO) Port. This port has
12 inputs that can be directly connected to buttons or switches, and 6 outputs that can
directly drive LEDs. To use this port you must create a simple but custom cable that
connects a DB25 connector to your buttons or LEDs. See the BrightSign Hardware
Manual for more information and example circuits. Roku has a test button/LED board
that you can purchase to evaluate the GPIO port and test your scripts that read the buttons
or set the LEDs.
Kommentare zu diesen Handbüchern