Ultrasonic sensor has issues with usb wall adapters?

I'm building a parking sensor using the NewPin library, ultrasonic sensor, LED, and an arduino nano. Everything works fine when I have it attached to my laptop. The measurements are accurate and the LED turns on and off when the distance hits a certain point.

However, when I take it to the garage the LED just stays on the whole time. It blinks every once in a while but it's only suppose to turn on when the range is less than 30". I thought it was the usb adapter so I connected it to my fast charging usb adapter that I have in the kitchen and I got the same results.

I connected a volt meter to it and sure enough, the arduino is outputting 4.8ish volts and then drops to 0 briefly and then back up to 4.8ish. Why would it be doing this only when connected to a usb outlet? They both output 5v with plenty of amps to power this.

Ok, so I got it working with a different library. I'm not sure what's up with NewPin's 1.7v library but it was not working for me when I plugged into a regular USB adapter. But using the Ultrasonic HC SR04 library worked like a charm. Here's the link to it if anyone's interested. Hope it helps someone else!