ping))) speed detector
hi
i am a student currently working on a project that uses products from parallax
i have bought the following product from parallax
1) ping))) ( http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/92/Default.aspx?SortField=ProductName%2cProductName)
2)BS2
3)lcd display (http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/50/Default.aspx?SortField=ProductName%2cProductName·)
4)math coprocessor (http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/coprocessor/List/1/ProductID/244/Default.aspx?SortField=ProductName%2cProductName)
I am suppose to make a device that have 2 program:
1) a program that can display the distance(part 1)·and the speed(part 2)·the device is moving on the lcd screen using the ping )))
2) a program that can can be place on a doorway and detector the number of passbyer and display the count on the lcd screen
I have manage to get the distance(part 1)·of program 1 and program 2 done ... but i am still having problem with the speed
Problems encounter:
1)in the code , i could get the speed in cm/hr , but the value appear *****.*** when it reach the maximum the ping))) can detect· (which·is·3100·cm) , how do i solve this problem ?
2)Regarding the speed·reading i want , i·am not sure if i am·heading in the right direction
· i·would like to make it into this kind of device(llustrate with situation)
Situation:
i am holding this device , there is an object in front of me , when i moved towards or away from it , it shows the speed i am moving at. if i am not moving the speed·, it will show (an example) 0 cm/hr.
how do i edit my code to allow it to get the program i want?
All helps are appreciated !![smilewinkgrin.gif](http://forums.parallax.com/images/smilies/smilewinkgrin.gif)
Thanks you
the source code for this program is attach below
i am a student currently working on a project that uses products from parallax
i have bought the following product from parallax
1) ping))) ( http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/92/Default.aspx?SortField=ProductName%2cProductName)
2)BS2
3)lcd display (http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/50/Default.aspx?SortField=ProductName%2cProductName·)
4)math coprocessor (http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/coprocessor/List/1/ProductID/244/Default.aspx?SortField=ProductName%2cProductName)
I am suppose to make a device that have 2 program:
1) a program that can display the distance(part 1)·and the speed(part 2)·the device is moving on the lcd screen using the ping )))
2) a program that can can be place on a doorway and detector the number of passbyer and display the count on the lcd screen
I have manage to get the distance(part 1)·of program 1 and program 2 done ... but i am still having problem with the speed
Problems encounter:
1)in the code , i could get the speed in cm/hr , but the value appear *****.*** when it reach the maximum the ping))) can detect· (which·is·3100·cm) , how do i solve this problem ?
2)Regarding the speed·reading i want , i·am not sure if i am·heading in the right direction
· i·would like to make it into this kind of device(llustrate with situation)
Situation:
i am holding this device , there is an object in front of me , when i moved towards or away from it , it shows the speed i am moving at. if i am not moving the speed·, it will show (an example) 0 cm/hr.
how do i edit my code to allow it to get the program i want?
All helps are appreciated !
![smilewinkgrin.gif](http://forums.parallax.com/images/smilies/smilewinkgrin.gif)
Thanks you
the source code for this program is attach below
Comments
For the maximum distance maxing out your speed, you can just test to see if the ping has reached the maximum range. If it has then your relative speed is 0.