Option Explicit function LeftFloor() as boolean dim adc as integer adc = GetADC(20) 'get the left floor sensor reading if adc > 450 then LeftFloor = false 'floor is dark else LeftFloor = true 'floor is white end if end function function RightFloor() as boolean dim adc as integer adc = GetADC(19) 'get the right floor sensor reading if adc > 450 then RightFloor = false 'floor is dark else RightFloor = true 'floor is white end if end function sub FloorSensorsOn() call putpin(12,1) end sub sub FloorSensorsOff() call putpin(12,0) end sub