Download - Chapter 5: Tactile Navigation With Whiskers
![Page 1: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/1.jpg)
1
Chapter 5: Tactile Navigation With Chapter 5: Tactile Navigation With WhiskersWhiskers
Presentation based on:"Robotics with the Boe-Bot"By Andy LindsayParallax, Inc
Presentation developed by:Presentation developed by:Martin A. HebelMartin A. HebelSouthern Illinois University CarbondaleSouthern Illinois University CarbondaleCollege of Applied Sciences and ArtsCollege of Applied Sciences and ArtsElectronic Systems TechnologiesElectronic Systems Technologies7/6/04
![Page 2: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/2.jpg)
2
Tactile Whiskers as switchesTactile Whiskers as switches
![Page 3: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/3.jpg)
3
![Page 4: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/4.jpg)
4
![Page 5: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/5.jpg)
5
![Page 6: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/6.jpg)
6
Whisker "switch" open and closedWhisker "switch" open and closed
![Page 7: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/7.jpg)
7
Code to View Whisker Switch Code to View Whisker Switch StatesStatesCode:
DO: DEBUG CLS, ? IN5, ? IN7 Pause 100LOOP
See "TestWhisker.bs2"
![Page 8: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/8.jpg)
8
Adding LED IndicationAdding LED Indication
![Page 9: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/9.jpg)
9
Code using IF…THENCode using IF…THEN
![Page 10: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/10.jpg)
10
AI – Escaping CornersAI – 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).
![Page 11: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/11.jpg)
11
Moving ForwardMoving Forward
![Page 12: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/12.jpg)
12
Simplifying Navigation with Simplifying Navigation with SubroutinesSubroutinesGOSUB – Used to temporarily
branch to another a section of code.Return – Used to return to where it
jumped from.See program "OneSubroutine.bs2"
![Page 13: Chapter 5: Tactile Navigation With Whiskers](https://reader035.vdocument.in/reader035/viewer/2022081801/56815db6550346895dcbe471/html5/thumbnails/13.jpg)
13
Roaming with WhiskersRoaming with WhiskersSee "RoamingWithWhiskers.bs2"