background image

Parallax, Inc.  

  Boe-Bot Tank Tread Kit (#28106)      

03/2004 

irBits          VAR     Nib                     ' ir detection bits 
irLeft          VAR     irBits.BIT1             ' left IR detection 
irRight         VAR     irBits.BIT0             ' right IR detection 
xAxis           VAR     Word                    ' x-axis tilt reading 
yAxis           VAR     Word                    ' y-axis tilt reading 
 
 
' -----[ EEPROM Data ]----------------------------------------------------- 
 
 
' -----[ Initialization ]-------------------------------------------------- 
 
Reset: 
  LOW LMotor                                    ' initialize motor outputs 
  LOW RMotor 
 
 
' -----[ Program Code ]---------------------------------------------------- 
 
Main: 
  DO 
    GOSUB Check_Level                           ' verify terrain okay 
 
    ' navigate around obstacles 
 
    GOSUB Read_IR_Sensors 
    ON irBits GOSUB Forward, Go_Left, Go_Right, U_Turn 
  LOOP 
 
  END 
 
 
' -----[ Subroutines ]----------------------------------------------------- 
 
Check_Level: 
  PULSIN TiltY, IsHigh, yAxis                   ' check longitudinal tilt 
  yAxis = yAxis / 100                           ' filter reading 
  IF (yAxis =< YThresh) THEN                    ' if terrain too steep 
    GOSUB U_Turn                                ' ... and turn around 
  ENDIF 
  RETURN 
 
 
Read_IR_Sensors: 
  irBits = %00 
  FREQOUT LfIrOut, 1, 38500                     ' modulate left IR LED 
  irLeft = ~LfIrIn                              ' read input (1 = target) 
  FREQOUT RtIrOut, 1, 38500                     ' modulate right IR LED 
  irRight = ~RtIrIn                             ' read input (1 = target) 
  RETURN 
 
 
Forward:                                        ' move tank forward 
  FOR pulses = 1 TO 5 
    PULSOUT LMotor, LFwd 
    PULSOUT RMotor, RFwd 
    PAUSE 20 
  NEXT 
  RETURN 
 

Summary of Contents for Boe-Bot Tank Treads

Page 1: ...ist Verify the contents of your Boe Bot Tank Tread App Kit to include Documentation 2 metal sides 720 28106 1 Plastic wheel set and 1 Rubber tread set 721 28106 2 Servo horn standard or disk 725 00013...

Page 2: ...ize 3 32 2 2 mm Figure 1 Modify Disk Horn with Drill or Knife Modify the disk servo horn by drilling or reaming the middle holes larger If using a knife ream from the top and bottom but leave material...

Page 3: ...8 Screws to Wheels Attaching the 7 8 screws to the wheels 2 large and 6 medium in size Remove the wheels from your Boe Bot The servos should be mounted with the head toward the rear ball wheel as in F...

Page 4: ...el Attach the remaining wheels by first tightening the nut on the wheel then loosening it a 1 3 a turn Mount with a nut on each side of the frame When the two nuts on each wheel are tightened check to...

Page 5: ...y wheels bind loosen the nut and remount to maintain a small gap between the wheel and nut Stretch the tread over the wheels and the assembly is done P15 P14 P13 P12 P11 P10 P9 P8 P7 P6 P5 P4 P3 P2 P1...

Page 6: ...Full Kit Memsic 2125 Accelerometer and the Boe Bot Tank Tread Kit Specifically you will be adding the following components to your Board of Education 2 Infrared transmitter assemblies 350 00017 2 Infr...

Page 7: ...7 Parallax Inc Boe Bot Tank Tread Kit 28106 03 2004 Schematic 1 2 4 3 5 6 X Vss Vss P5 P4 5 Memsic 2125 Vdd Vss P0 220 Vdd Vss P9 220 P8 IR LED Vss 1 k P1 IR LED Vss 1 k...

Page 8: ...Definitions LfIrOut PIN 8 left IR LED output LfIrIn PIN 9 left IR sensor input RtIrOut PIN 1 right IR LED output RtIrIn PIN 0 right IR sensor input LMotor PIN 13 left servo motor RMotor PIN 12 right...

Page 9: ...e around obstacles GOSUB Read_IR_Sensors ON irBits GOSUB Forward Go_Left Go_Right U_Turn LOOP END Subroutines Check_Level PULSIN TiltY IsHigh yAxis check longitudinal tilt yAxis yAxis 100 filter readi...

Page 10: ...n turn around IF yAxis YThresh THEN GOSUB Back_Up back up if flat terrain ENDIF PULSIN TiltX IsHigh xAxis check longitudinal tilt xAxis xAxis 100 filter reading IF xAxis 24 THEN turn left FOR pulses 1...

Reviews: