VexCode Sonar

Is the “Sonar” referenced in VexCode the Ultra Sonic Range Finder 276-2155?
Does the second wire from the sensor just get plugged into the (3) wire port on the brain?

Yes the sonar is the Ultra Sonic Range Finder. In VEXcode if you type like: Sonar sonar = Sonar(Brain.ThreeWirePort.A); it will automatically the output to port B. However, you can only do this with the “odd” ports (A, C, E, F). Hope this helps and good luck this season!


It works!!! Thank you for the heads-up odd numbered ports.

1 Like