Introduction to Robotics/Printouts/Sound Waves: Difference between revisions
Appearance
wikademia>Whiteknight New page: {{Introduction to Robotics/Page top|title=Sound Waves}} ;Speed of sound: :<math>D = Ct</math> :''D'' is the distance, measured in meters. :''C'' is the speed of sound in air, measured in ... |
wikademia>Whiteknight No edit summary |
||
| Line 16: | Line 16: | ||
:The BoeBot measures ''t'' in "clock cycles", which are each 2μseconds. We must convert the equation to use seconds instead of clock cycles: | :The BoeBot measures ''t'' in "clock cycles", which are each 2μseconds. We must convert the equation to use seconds instead of clock cycles: | ||
:<math>D = \frac{100Ct}{2}\times\frac{2}{1,000,000} = frac{Ct}{10,000} = 0.03448t</math> | :<math>D = \frac{100Ct}{2}\times\frac{2}{1,000,000} = frac{Ct}{10,000} = 0.03448t</math> | ||
:At 72°, sound travels at 344.8''m/s''. | |||
;Fractional Math | ;Fractional Math | ||
| Line 27: | Line 28: | ||
;Finding the Conversion Constant: | ;Finding the Conversion Constant: | ||
:<math>Conversion = 0.03448 \times 65536 = 2260</math> | :<math>Conversion = 0.03448 \times 65536 = 2260</math> | ||
{{Introduction to Robotics/Page bottom}} | {{Introduction to Robotics/Page bottom}} | ||
Revision as of 17:55, 30 July 2007
Name:_________________________________
Date: 09 / 30 / 2026
Sound Waves
- Speed of sound
- <math>D = Ct</math>
- D is the distance, measured in meters.
- C is the speed of sound in air, measured in meters per second.
- t is the amount of time the wave travels, measured in seconds.
- Convert to Centimeters
- We convert to centimeters because they are more useful, and it helps to remove fractions from our calculation.
- <math>D = Ct \times \frac{100cm}{1m} = 100Ct</math>
- For the BoeBot
- <math>D = \frac{100CT}{2}</math>
- Because the sound wave must travel to the object and back.
- The BoeBot measures t in "clock cycles", which are each 2μseconds. We must convert the equation to use seconds instead of clock cycles:
- <math>D = \frac{100Ct}{2}\times\frac{2}{1,000,000} = frac{Ct}{10,000} = 0.03448t</math>
- At 72°, sound travels at 344.8m/s.
- Fractional Math
- The BoeBot can do some limited math with fractions.
- The "**" operator is used as follows:
- <math>A**B = A \times \frac{B}{65536}</math>
- We calculate that:
- We can use the following code to convert time to distance:
Distance = Conversion ** time
- Finding the Conversion Constant
- <math>Conversion = 0.03448 \times 65536 = 2260</math>