
MikeC531
USA
Asked
— Edited
Is there a way of adusting the speed of the scan of the HC-SR04 using the SDK or do you have to do your own timing ? I noticed in the ARC the interval changes the speed of the sweep, but i can't seem to find any interval in the SDK anywhere for interval, am I missing it somewhere ?
Thanks Mike
Would you be able to post your code as an example for me to get an idea of where you're at?
Here is the part of the code i'm working on.
// getShortestDist();
// turnTowardShortest();
Here, try this. I use the timer to control the speed of the sweep. A timer is a good idea because it also allows the UI to respond. If you put the sweep in a FOR loop, then you lock up the UI thread.
Thanks
Got it working now, i guess i was just brain dead for a little while.
Thanks alot Mike
Hehehe, glad it worked out Mike!