Download Print this page

Parallax 29115 Manual page 10

Line follower module

Advertisement

DEBUG "
|
DEBUG "
-- O --
' -----[ Main Code ]------------------------------------------------------------
'
Main:
GOSUB Read_Line_Follower
DEBUG MoveTo, 4, 3, BIN5 lfBits
GOTO Main
END
' -----[ Subroutines ]----------------------------------------------------------
'
Read_Line_Follower:
lfBits = 0
FOR ledPos = 2 TO 6
OutL.LowBit(ledPos) = LEDon
PAUSE 1
lfBits.LowBit(ledPos) = In9 ^ LFmode
OutL = OutL | %01111100
NEXT
lfBits = lfBits >> 2
RETURN
Notes:
Parallax, Inc. • Parallax Line Follower (#29115) • 12/2001
|
", CR
", CR
' read the Line Follower
' display LF reading
' clear last reading
' turn the LED on
' allow sensor to read
' record the sensor reading
' turn LEDs off
' shift bits to zero index
Page 9

Advertisement

loading