| ROBODYSSEY SYSTEMS LLC |
|
Product Catalog Code Page Policies Gallery Whats New Press Releases Resources Links Contact Us About Us Press Educators Page BasicX and Robotics book After School Mini Challenge! Free Robots to Kids Hack-A-Toy Shopping Cart |
Page9_4
|
| PIC Home | Previous Page | Next Page | Next Chapter |

PROGRAM NAME CREATED VIA NEW PROJECT!!
COPY AND PASTE FROM NEXT LINE DOWN
'*********************
Dim dlay as Integer
'*********************
Sub Procedure DlayVar
dlay = dlay - 1
Vdelay_ms(dlay)
End Sub
'*********************
Sub Procedure scroll ' Pretty Marquee lights
PortB = %01001001
Sound_Play(dlay,20)
DlayVar
PortB = %10010010
Sound_Play(dlay,20)
DlayVar
PortB = %00100100
Sound_Play(dlay,20)
DlayVar
End Sub
'*********************
Main:
TrisB = %00000000 ' Configure PortB pins as output
TrisA = %00000000 ' Configure PortA pins as output
CMCON = %00000111 ' Stupid Comparitor
Sound_Init(PortA,0)
dlay = 200
MainLoop: ' We could have called it Kansas
scroll
If dlay <=25 Then
PortB = %10000001
Sound_Play(20,90)
PortB = %01000010
Sound_Play(25,90)
PortB = %00100100
Sound_Play(50,90)
PortB = %00011000
Sound_Play(75,90)
PortB = %00111100
Sound_Play(100,90)
PortB = %01111110
Sound_Play(150,90)
PortB = %10000001
Sound_Play(200,90)
dlay = 200
End If
Goto MainLoop
End.
| PIC Home | Previous Page | Next Page | Next Chapter |
| Home | Product Catalog | Shopping Cart | Resources | Links |
| Code Page | Policies | Gallery |