Two sonars stops working when pin 17 set to output
Issue #68
resolved
Arduino mega 2560, when "pinMode(17, OUTPUT)" is uncommented in the attached code, sonar1 stops working (always returns 0 distance). Only seems to apply to pin 17.
Comments (2)
-
repo owner -
repo owner - changed status to resolved
This wouldn't have anything to do with the NewPing library. My guess is that there's a conflict between the analog pings you're using and pin 17. Pin 17 is a serial pin, so it uses timers which could have a conflict with other pins. This is a common Arduino issue.
- Log in to comment