Our Robot (:
For this challenge, we only needed a very simple design for our robot. Here shows oru NXT programmer with a light sensor connected to port 1 and a touch sensor connected to port 2. Although we didn't need any actual strusture, these sensors will be very useful for this challenge to help collect the data that we need to accomplish this task.
Program
This program tells our NXT bot to take a sample of the sound every half a second for 20 seconds using a light sensor. The other icon tells the NXT to take a sample of the sound every half a second for 20 seconds. This data will allow us to determine how far away the thunderstorm is occuring.
Math Involved
Take number of seconds between flash and sound. Multiply the number by 1200, then divide by 5280. Check the math with storm distance calculator.
http://www.csgnetwork.com/lightingdistcalc.html
# of seconds between flash and sound = 5 seconds
5 x 1200 = 6000
6000 / 5280 = 1.1364
http://www.csgnetwork.com/lightingdistcalc.html
# of seconds between flash and sound = 5 seconds
5 x 1200 = 6000
6000 / 5280 = 1.1364