APPENDIX C – EXAMPLE SCRIPT
The following code uses GPIO buttons 1, 2, 3, 4 for controls. It will work on any BrightSign model that has a video output
and a GPIO port.
REM
REM The game of Snake
REM demonstrates BrightScript programming concepts
REM June 22, 2008
REM
REM Every BrightScript program must have a single Main()
REM
Sub Main()
game_board=newGameBoard()
While true
game_board.SetSnake(newSnake(game_board.StartX(), game_board.StartY()))
game_board.Draw()
game_board.EventLoop()
if game_board.GameOver() then ExitWhile
End While
End Sub
REM *******************************************************
Comentarios a estos manuales