'**| IOMap.BAS |******************************************* ' Hardware Map '********************************************************** PUBLIC Const GreenLED As Byte = 26 PUBLIC Const RedLED As Byte = 25 PUBLIC Const LEDon As Byte = 0 PUBLIC Const LEDoff As Byte = 1 ' Start PUBLIC CONST StartPinNum AS BYTE = 10 ' Left Motor PUBLIC CONST LMotorSpdPinNum AS BYTE = 26 PUBLIC CONST LMotorDirPinNum AS BYTE = 14 ' Right Motor PUBLIC CONST RMotorSpdPinNum AS BYTE = 27 PUBLIC CONST RMotorDirPinNum AS BYTE = 13 ' GP2D02 IR Distance Sensor PUBLIC CONST GP2D02StartPinNum AS BYTE = 20 'PUBLIC CONST LGP2D02InPinNum AS BYTE = 18 PUBLIC CONST GP2D02InPinNum AS BYTE = 19 ' Head motor PUBLIC CONST HeadMotor AS BYTE=18 PUBLIC CONST HeadMotorMax AS INTEGER=2000 PUBLIC CONST HeadMotorMin AS INTEGER=700 PUBLIC CONST HeadMotorCenter AS INTEGER=1400 PUBLIC CONST HeadMotorInc AS INTEGER=100 PUBLIC Const Fwd AS BYTE = 3 ' Motor command to make the robot go forward PUBLIC CONST Right AS BYTE = 2 ' Motor command to make the robot rotate right PUBLIC CONST Left AS BYTE = 1 ' Motor command to make the robot rotate left PUBLIC Const Rev AS BYTE = 0 ' Motor command to make the robot go reverse PUBLIC CONST EdgeSensorRight AS BYTE = 16 PUBLIC CONST EdgeSensorLeft AS BYTE = 15 SUB INIT() CALL PUTPIN(RMotorSpdPinNum,0) CALL PUTPIN(LMotorSpdPinNum,0) CALL PUTPIN(LMotorDirPinNum,0) CALL PUTPIN(RMotorDirPinNum,0) Dim x as integer ' For x = 1 to samples ' LeftEye(x) = 0 ' RightEye(x) = 0 ' Next END SUB