Download Print this page

Parallax 29115 Manual page 9

Line follower module

Advertisement

Listing 1
' -----[ Title ]----------------------------------------------------------------
'
' File...... LF_TEST.BS2
' Purpose... Line Follower Test and Calibrate
' Author.... Parallax
' E-mail.... stamptech@parallaxinc.com
' { $STAMP BS2 }
' -----[ Program Description ]--------------------------------------------------
'
' This program is used to test and calibrate the BOE-Bot Line Follower module.
' -----[ Revision History ]-----------------------------------------------------
'
' 01 DEC 2001 - Version 1.0
' -----[ I/O Definitions ]------------------------------------------------------
'
' -----[ Constants ]------------------------------------------------------------
'
LEDon
CON
LEDoff
CON
WLine
CON
BLine
CON
LFmode
CON
MoveTo
CON
' -----[ Variables ]------------------------------------------------------------
'
ledPos
VAR
lfBits
VAR
' -----[ EEPROM Data ]----------------------------------------------------------
'
' -----[ Initialization ]-------------------------------------------------------
'
Initialize:
OutL = %01111100
DirL = %01111100
Draw_Output_Screen:
PAUSE 200
DEBUG "Line Follower Test", CR
DEBUG CR
DEBUG "
-------
DEBUG " | |
DEBUG " +-|
DEBUG " | |
DEBUG "
|
Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001
0
1
0
1
BLine
2
Nib
Byte
", CR
| | ", CR
|-+ ", CR
| | ", CR
|
", CR
' LF LEDs are active low
' white line on black field
' black line on white field
' set pgm for black line
' move to position character
' LED position in lfBits
' line follower input bits
' all LF LEDs off
' make pins outputs
Page 8

Advertisement

loading