|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Sonar programming
We tried to activate the Sonar sensor with this code:
http://www.mediafire.com/?kay8tn380d00syh But unfortunately it did not work ( as in getting the distance of the object which stands infront it) can anyone examine the code and help us understand why? Thank you. |
|
#2
|
|||||
|
|||||
|
Re: Sonar programming
I'm not going to download a random "rar" file from a suspicious site.
Have you tried one of the "EZ1 MB1010 Sonar" LabVIEW examples? |
|
#3
|
|||
|
|||
|
Re: Sonar programming
Quote:
We tried both examples, analog and digital, and the indicator showed the value 0 in diffrent situations. What may cause this problem? |
|
#4
|
||||
|
||||
|
Re: Sonar programming
How did you wire up the sensor?
|
|
#5
|
|||
|
|||
|
Re: Sonar programming
First we wired it to Analog input and used the analog sonar example code from NI, and it showed 0. Then we tried the digital sonar example code and we wired the Sonar to Digital I/O and it showed 0 again. |
|
#6
|
|||||
|
|||||
|
Re: Sonar programming
The example software is assumed to be good, so we can rule that out as a cause of your problem. That leaves configuration and wiring as the primary suspects. You did change the example's properties to connect to 10.19.43.2 instead of 10.0.0.2, right?
How exactly did you wire the sensor? Don't just say "to an analog" or "to a digital" -- give specific details on what pin or hole each wire comes from and goes to. What is the battery voltage displayed on your Driver Station? What is the Robot Signal Light doing? It could be that your sensor is faulty, but I've never seen one of those go bad. |
|
#7
|
|||
|
|||
|
Re: Sonar programming
Ok so I've added the code in an attachment to this message and we've wired the sonar as the diagram showed in the example.
Thanks. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|