0

Using two ultrasonic sensors together, how can I enable one before the other?

  • Do you have a circuit? Any code? – Dave X May 12 '16 at 16:40
1

You need to tell the sensor to send their pulse using the trigger line. So triggering isn't a problem. The problem is that you might get an echo returned on both sensors, but you know which sensor sent the pulse so you can ignore the return that was received by the 'wrong' sensor in your code. So

While(1)
{
  SendPulse(SensorTx1);
  GetEcho(SensorRx1);
  SendPulse(SensorTx2);
  GetEcho(SensorRx2);
}

Is that what you mean? If not please can you expand you question?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.