slight change in sketch means sensor won't let servo run with the +5v connected

Hello! This is Tom Bonar from MaxBotix Inc.

@PrinterBird

I see that you are using one of our LV-MaxSonar-EZ sensors in your application, and you are trying to use it to trip an Arduino at a set distance in your sketch. The distance that you mentioned of 2 inches, is not able to be done with our sensors. The LV-MaxSonar-EZ sensors have a minimum reported distance of 6 inches. This means that anything closer than 6 inches is reported as 6 inches. If you change your sketch to trip at 7 or 8 inches, your programming should work. The sensor will provide range data to the detected object from 6 inches to 255 inches.

Please let me know if you have any questions by emailing thomas@maxbotix.com and I will be glad to assist you.

Best regards,

Tom Bonar
Technical Support
of MaxBotix Inc.
Phone: (218) 454-0766
Fax: (218) 454-0768
Email: thomas@maxbotix.com
Web: www.maxbotix.com
Follow us on Facebook at: Redirecting...

Technical support and sales are subject to
the terms and conditions listed on our
website at http://www.maxbotix.com/ MaxBotix,
MaxSonar,EZ0, EZ1, EZ2, EZ3, EZ4, AE0, AE1,
AE2, AE3, AE4, WR1, WRA1, and WRLA1 are
trademarks of MaxBotix Inc.