Thank you for the response. Using vex sensors. The echo is on (interrupt port 1), and the ping is on (analog/digital port 1). Also, I have tried it with echo=1 and ping = 1 -11.
The current configuration is the one that worked in RobotC. I have not changed the sensor’s wiring.
{ The following is the post I was in the process of writing when I had an idea I felt the need to verify. }
Thanks, I guess I didn’t see that in the documentation. However, I did try moving the input connection to Digital Output 11 and 16, with no change in results.
Well, not exactly . . . once when I turned the Vex back on to upload a code modification it started outputting the Ultrasonic value to the terminal. It did it really fast as well, instead of the slow crawl it does when it is not working.
I really wish I knew what was going on here.
{End post}
Umm, what … I am now confused and mystified.
It works now. Sort of. Here is what happened…
changed #define UltraOnePing from ‘1’ to ‘11’
moved ‘input’ from port 1 to port 11
uploaded code
nuthin’
…
changed #define UltraPingOne from ‘11’ to ‘16’
moved ‘input’ from port 11 to port 16
uploaded code –>terminal popped up while uploading and Vex was outputting expected values, upload completed, no more good output.
Wrote response on CD…had a thought.
9)changed #define UltraPingOne back to ‘11’
left ‘input’ plugged into port 16
uploaded code
Now it works.
If I set the Ping port to 11 and plug the wire into port 16 it works. The echo (output) wire is still plugged in to interrupt port 1.
Thanks again. I still am reading off of port 16 when port 11 is what is in the code. Also, it seems that is the only configuration I can find that works.