Chapter 8 - Robot Control with Distance Detection |
Outcomes: By the time you complete this section you will be able to:
Assignments:
|
Videos and Simulations
Activity Videos: |
Example Program Code Activity #1 : Activity #2 : Activity #3 :
|
Key Points or FAQs: What is Frequency sweep and how is it applied to distance detection? Frequency Sweep is the technique of testing a circuit’s output using a variety of input frequencies. By testing known distances from the Boe-Bot, at different intervals, you will establish a baseline and therefore be able to determine if an item is within a given distance and if it’s getting closer or father away. What does the Lookup command do? This command is the best approach for storing a short list of values that you want to retrieve and use in sequence. For Example, this set of code loops through 5 different frequencies (0 to 4). The lookup command selects a number from a range of numbers contained within the brackets and then stores that number in the variable irFrequency in this example. The FreqOut command sends that stored number in irFrequency to pin 8 and allows the BoeBot to detect objects at that frequency. FOR freqSelect = 0 TO 4 LOOKUP freqSelect,[37500,38250,39500,40500,41500],irFrequency FREQOUT 8,1, irFrequency irDETECT = IN9 NEXT What is Proportional control? Proportional control in a closed-loop system is a process where the error is multiplied by a proportionality constant to determine the system’s output. It allows us to track variances within the system. |
|||