I’m a little lost. I just got my programming kit and an ultrasonic sensor and I need help. In the inventers guide it told me to plug both connectors into adjacent interupt ports but I connected the input to digital input 11 and the output to interupt 1. Now my questions, first I downloaded the test code and I don’t understand what it is telling me. I get the scrolling "0"s and when I wave my hand in front I get the occasional “1”, what does this mean? Second am I supposed to program for the distance parameters? (maybe like “if object detected in 12 inches then”) Please give me some ideas as the “ULTRASONICTEST” is not helping
I know that this question is probably a no brainer, but I’m new and am really lost. I really would appreciate a suggestion. Thanks
Thanks Ricky very helpful stuff
OK I got one more question. Is it possible to ruin an ultrasonic sensor by hooking it up improperly? I’m messing with your code suggestions and it’s not working. I’m worried that I may have toasted the sensor. What is the correct way to hook it up? (Sensor input to MCU digital out, and sensor output to interrupt, right?) This is the way it’s hooked up now but I did try other combinations. Appreciate all the help.
You are correct. You connect the sensor output to a Vex Controller Interrupt and the sensor input to a Vex Controller Digital Output. If you are using MPLAB, you can use the Vex Sensor Test on our downloads page to determine if the sensor is working.
Ricky I am using EasyC. Will this test still work?
The files in the Sensor Test zip download from our Downloads page are “C” files written for MPLAB. I do not know if there is a way to run these files from easyC.
Thanks though. I read the PDF file and it sounds like this is exactly what I need. You see, I’m afraid that I hooked the output of the sensor to the digital output of the processor, and the input of the sensor to the interrupt and damaged the sensor as it doesn’t seem to be working. Is this possible?
We did not design the sensors so I can not answer if there is internal protection. Since this device uses sound and reflections, many things can influence its operation - it can stop working from just taking it apart.
Thanks sir. You have been most helpful.
Ricky
Guess what? I replaced the sensor and all is working perfectly. Thank you for taking the time to help me with my problem, I really appreciate this.
Glad you are up and running!