1 / 13

Chapter 5: Tactile Navigation With Whiskers

Chapter 5: Tactile Navigation With Whiskers. Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc. Presentation developed by: Martin A. Hebel Southern Illinois University Carbondale College of Applied Sciences and Arts Electronic Systems Technologies 7/6/04.

carson
Download Presentation

Chapter 5: Tactile Navigation With Whiskers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5: Tactile Navigation With Whiskers Presentation based on:"Robotics with the Boe-Bot" By Andy LindsayParallax, Inc Presentation developed by:Martin A. HebelSouthern Illinois University Carbondale College of Applied Sciences and Arts Electronic Systems Technologies 7/6/04

  2. Tactile Whiskers as switches

  3. Whisker "switch" open and closed

  4. Code to View Whisker Switch States Code: DO: DEBUG CLS, ? IN5, ? IN7 Pause 100 LOOP See "TestWhisker.bs2"

  5. Adding LED Indication

  6. Code using IF…THEN

  7. AI – Escaping Corners ' --- Detect Consecutive Alternate Corners ------------------------ ' See the "How EscapingCorners.bs2 Works" section that follows this program. IF (IN7 <> IN5) THEN ' One or other is pressed. IF (Old7 <> IN7) AND (Old5 <> IN5) THEN ' Different from previous. counter = counter + 1 ' Alternate whisker count + 1. old7 = IN7 ' Record this whisker press old5 = IN5 ' for next comparison. IF (counter > 4) THEN ' If alternate whisker count = 4, counter = 1 ' reset whisker counter GOSUB Back_Up ' and execute a U-turn. GOSUB Turn_Left GOSUB Turn_Left ENDIF ' ENDIF counter > 4. ELSE ' ELSE (old7=IN7) or (old5=IN5), counter = 1 ' not alternate, reset counter. ENDIF ' ENDIF (old7<>IN7) and ' (old5<>IN5). ENDIF ' ENDIF (IN7<>IN5).

  8. Moving Forward

  9. Simplifying Navigation with Subroutines • GOSUB – Used to temporarily branch to another a section of code. • Return – Used to return to where it jumped from. • See program "OneSubroutine.bs2"

  10. Roaming with Whiskers See "RoamingWithWhiskers.bs2"

More Related