Microsoft Small Basic
Program Listing:
Embed this in your website
<object id='sbapp' data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='640' height='480'> <param name='source' value='http://smallbasic.com/program/ClientBin/SBWeb.xap'/> <param name='onError' value='onSilverlightError' /> <param name='background' value='white' /> <param name='minRuntimeVersion' value='3.0.40624.0' /> <param name='autoUpgrade' value='true' /> <param name='initParams' value='programId=ZRL837' /> </object>
Matrix_Width
=
540
Matrix_Height
=
120
LED_Size
=
15
LED_Color_Out
=
"DarkGreen"
LED_Color_In
=
"Green"
LED_Num_H
=
36
LED_Num_V
=
8
Shift
=
36
Data
=
"Amir=0\=0\\\=0\\\;1\\\=1\\\;2\\\=1\\\;3\\\=1\\\;4\\\=1\\\;5\\\=0\\\;6\\\=0\\\;15\\\=0\\\;16\\\=1\\\;17\\\=1\\\;18\\\=0\\\;19\\\=0\\\;20\\\=1\\\;21\\\=1\\\;22\\\=1\\\;23\\\=1\\\;24\\\=0\\\;25\\\=0\\\;26\\\=0\\\;27\\\=0\\\;28\\\=0\\\;29\\\=0\\\;30\\\=1\\\;31\\\=1\\\;7\\\=0\\\;8\\\=1\\\;10\\\=0\\\;11\\\=0\\\;12\\\=1\\\;13\\\=1\\\;14\\\=0\\\;9\\\=1\\\;\;1\=13\\\=1\\\;12\\\=1\\\;11\\\=1\\\;10\\\=1\\\;7\\\=1\\\;4\\\=1\\\;3\\\=1\\\;1\\\=1\\\;0\\\=1\\\;6\\\=0\\\;5\\\=1\\\;2\\\=1\\\;30\\\=1\\\;31\\\=0\\\;29\\\=1\\\;28\\\=0\\\;27\\\=0\\\;26\\\=0\\\;25\\\=0\\\;24\\\=1\\\;23\\\=1\\\;22\\\=1\\\;21\\\=1\\\;20\\\=1\\\;14\\\=1\\\;15\\\=0\\\;16\\\=1\\\;17\\\=1\\\;19\\\=1\\\;18\\\=0\\\;8\\\=1\\\;9\\\=1\\\;\;2\=6\\\=0\\\;3\\\=0\\\;2\\\=0\\\;1\\\=1\\\;0\\\=1\\\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\;8\\\=1\\\;7\\\=1\\\;6\\\=0\\\;30\\\=1\\\;29\\\=1\\\;28\\\=0\\\;27\\\=0\\\;18\\\=0\\\;17\\\=1\\\;16\\\=1\\\;15\\\=0\\\;14\\\=1\\\;13\\\=1\\\;12\\\=0\\\;19\\\=1\\\;20\\\=1\\\;21\\\=0\\\;22\\\=0\\\;23\\\=0\\\;24\\\=0\\\;25\\\=0\\\;26\\\=0\\\;\;7\=2\\\=0\\\;3\\\=0\\\;1\\\=1\\\;0\\\=1\\\;4\\\=1\\\;5\\\=1\\\;31\\\=1\\\;30\\\=1\\\;29\\\=0\\\;28\\\=0\\\;27\\\=0\\\;26\\\=0\\\;25\\\=0\\\;24\\\=0\\\;23\\\=0\\\;22\\\=0\\\;21\\\=0\\\;20\\\=1\\\;19\\\=1\\\;18\\\=0\\\;17\\\=1\\\;16\\\=1\\\;15\\\=0\\\;14\\\=1\\\;13\\\=1\\\;12\\\=0\\\;11\\\=1\\\;6\\\=0\\\;7\\\=1\\\;8\\\=1\\\;9\\\=0\\\;10\\\=1\\\;\;5\=3\\\=1\\\;2\\\=1\\\;1\\\=1\\\;0\\\=1\\\;4\\\=1\\\;5\\\=1\\\;31\\\=0\\\;11\\\=1\\\;10\\\=1\\\;9\\\=0\\\;8\\\=1\\\;7\\\=1\\\;6\\\=0\\\;30\\\=0\\\;29\\\=1\\\;28\\\=1\\\;27\\\=0\\\;26\\\=0\\\;25\\\=0\\\;24\\\=0\\\;23\\\=0\\\;20\\\=1\\\;19\\\=1\\\;18\\\=0\\\;17\\\=1\\\;16\\\=1\\\;15\\\=0\\\;14\\\=1\\\;13\\\=1\\\;12\\\=0\\\;21\\\=0\\\;22\\\=0\\\;\;;"
GraphicsWindow
.
Width
=
Matrix_Width
GraphicsWindow
.
Height
=
Matrix_Height
GraphicsWindow
.
BackgroundColor
=
"Black"
GraphicsWindow
.
Title
=
"LED Matrix Scroller Display"
GraphicsWindow
.
PenColor
=
LED_Color_Out
GraphicsWindow
.
BrushColor
=
LED_Color_In
For
_V
=
0
To
LED_Num_V
-
1
For
_H
=
0
To
LED_Num_H
-
1
LED_Bulb
[
_V
]
[
_H
]
=
Shapes
.
AddEllipse
(
LED_Size
,
LED_Size
)
Shapes
.
Move
(
LED_Bulb
[
_V
]
[
_H
]
,
(
_H
*
LED_Size
)
,
(
_V
*
LED_Size
)
)
Shapes
.
SetOpacity
(
LED_Bulb
[
_V
]
[
_H
]
,
10
)
EndFor
EndFor
Scroll
(
)
Sub
Display
For
_V
=
0
To
LED_Num_V
-
1
For
_H
=
0
To
LED_Num_H
-
1
If
Data
[
"Amir"
]
[
_V
]
[
_H
]
=
1
Then
Shapes
.
SetOpacity
(
LED_Bulb
[
_V
]
[
_H
+
Shift
]
,
100
)
Else
Shapes
.
SetOpacity
(
LED_Bulb
[
_V
]
[
_H
+
Shift
]
,
10
)
EndIf
EndFor
EndFor
EndSub
Sub
OffallLEDs
For
_V
=
0
To
LED_Num_V
-
1
For
_H
=
0
To
LED_Num_H
-
1
Shapes
.
SetOpacity
(
LED_Bulb
[
_V
]
[
_H
]
,
10
)
EndFor
EndFor
EndSub
Sub
Scroll
Shift
=
LED_Num_H
OffallLEDs
(
)
While
"True"
Shift
=
Shift
-
1
If
Shift
<
-
36
Then
Shift
=
LED_Num_H
EndIf
Display
(
)
Program
.
Delay
(
100
)
EndWhile
EndSub
Copyright (c) Microsoft Corporation. All rights reserved.