OpenGarage Forums OpenGarage Firmware Second Sensor for One Door 2 Car Reply To: Second Sensor for One Door 2 Car

#838

lawrence_jeff
Participant

Just to clarify, having two share the same trigger is not what I am recommending nor what I have in the code, that will be inherently problematic in our application. My code uses the 3 wire mode as in the URL you sited, this ensures that only one sensor is active at a time and prevents one from confusing the other.

How this mode works – is that it sets the pin to output mode, sends the pulse to trigger a measurement (ignored by the echo pin) and then quickly shifts the pin to an input so it can read the reply signal (ignored by the trigger pin). I would get this working in your setup if you plan on using more than one sensor – Not sure what issue you are having – i would start with using one sensor and figure out why it isn’t working. Are you powering the sensor with 5v or 3.3?