Option Explicit '---- I/O Pins --------------- public Const RunButton as byte = 6 'pin number for the run button public Const ModeButton as byte = 7 'pin number for the mode button public Const LeftBumper as byte = 11 'left bumper pin public Const RightBumper as byte = 10 'right bumper pin '---- Mode Constants --------- public Const modeRun as byte = 1 'maze running mode public Const modeLine as byte = 2 'line follower mode public Const modeDiag as byte = 3 'display bumpers and batteries public Const modeSensor as byte = 4 'display sensor readings public Const modeNoFloor as byte = 5 'run maze without floor sensors public Const modeDump as byte = 6 'dump memory to pc public Const modeLast as byte = 7 'place holder for last mode '---- Constants -------------- public Const Left as byte = 1 public Const Right as byte = 2 public Const Both as byte = 3 '---- Globals ---------------- public Button as byte 'what button was pressed public Mode as byte 'current operating mode public Bumper as byte 'what bumpers are pressed public Running as byte 'set when running public LEDStack(1 to 32) as byte 'stack for the blinking LED task public Blinkstack(1 to 32) as byte 'stack for slow blink public BatteryLow as boolean 'battery low flag public WhichBump(1 to 20) as byte public Data(1 to 20) as single public ptr as integer