View Single Post
  #15   Spotlight this post!  
Unread 16-03-2006, 16:34
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: SONAR Sensor Software Driver

Quote:
Originally Posted by MikeDubreuil
Perfect
IT WORKS! Cool. Thanks so much for the code.

NOTE: ERROR IN VEX SONAR DATA SHEET! The data sheet that comes with the VEX sonar kit has an error. It says,
Quote:
The connector labelled "OUTPUT" is the trigger output of the Vex microcontroller;...
and
Quote:
The connector Labelled "INPUT" is the echo response from the ultrasonic detector; this is the line through which the Vex microcontroller receives output from the detector, ...
Well, that seemed backwards to me, but I carefully hooked up the "OUTPUT" to the digital_io_16 port on the FRC, which your code uses to signal the unit to ping, and hooked the "INPUT" to the INT2 (digital_io_1) port on the FRC. It didn't work. I checked everything else, then switched the two wires. Then it worked. THE VEX DOCUMENTATION IS BACKWARDS. The device's wire marked "output" is indeed the output of the device.

One way to tell that it's hooked up right and the software is pinging it is to hold the device up to your ear and listen to it. When I got it working I could hear a faint "tictictictic..." coming from the device. I did not hear that before I switched the wires.

Thanks again. Now I have to write new autonomous code that I can't test on the robot until we get to the next regional.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.