![]() |
Ultrasonics
I have wrote the code for this over and over, This way and that way.
But I can't get 2 sonics to work at anytime. I need 4 sonics to cover the 4 sides of my bot.(east-west-north-south) Can someone help me solve this problem? Calvin |
Re: Ultrasonics
The way you want to run the ultrasonics is
void OperatorControl ( void ) { while ( 1 ) { StartUltrasonic ( 1 , 9 ) ; // Sensor1 Ultra1 = GetUltrasonic ( 1 , 9 ) ; // Sensor 1 StopUltrasonic ( 1 , 9 ) ; // Sensor 1 StartUltrasonic ( 2 , 10 ) ; // Sensor 2 Ultra2 = GetUltrasonic ( 2 , 10 ) ; // Sensor 2 StopUltrasonic ( 2 , 10 ) ; // Sensor 2 } } |
| All times are GMT -5. The time now is 17:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi