|
Re: Analog ultrasonic sensor class?
My team is trying to use the EZ4 version sensor. We don't have any electrical people so we are having trouble figuring out how to wire it up. We used a pwm cable. The red and black wires are hooked up to GND and +5. The white wire is hooked up to the PW pin. The sensor is plugged into the analog bumper. The RX pin is not connected which means the sensor will send pings constantly. Does that sound right?
If we only connect the PW pin, will the Ultrasonic class still be usable? What would use as an arg for the ping channel for the constructor if we don't have it hooked up?
We plugged in the PW signal pwm wire into the analog bumper, channel 3.
We tried instantiating an instance of Ultrasonic with ping channel = 0 and echo channel = 3. IsRangeValid() returns false and GetRangeInches() returns 0. We aren't calling Ping() because the sensor should be sending out pings. We also tried instantiating with ping channel = 3 and echo channel = 3. Same result.
What are we doing wrong? Do we need to use a different class to use this sensor? Is the FPGA bug I've seen on other threads causing problems with readings?
Do we need to wire up the RX pin to another channel on the analog bumper? If so, do we only connect the white wire since the echo channel pwm already has power wires hooked up?
Thanks in advance.
Last edited by loafdog : 01-24-2009 at 01:18 PM.
|