|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 } } |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ultrasonics | Ctx32 | FIRST Tech Challenge | 3 | 06-05-2006 14:32 |