NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

NomNom:
Hey Tim,

Thanks for getting back to me on this issue. Please bare with me since I'm still in 10th grade and fairly new to some of these aspects

I have tried a simple sketch that will blink an LED if anything is between 100cm to 400cm on an Arduino and the code worked perfectly. The light would turn ON when an object was within that range and if i pointed the sensor straight up towards the sky the LED would turn OFF and on the serial monitor i would see 0cm repeated.The sensor I'm using reads pretty well up to 480cm.

BUT when i put the same code onto an Attiny84@ 8mhz everything works perfect ,including detecting objects at closer range, except for the part where me pointing the sensor to the sky would still activate the LED instead of it being read as a '0' and keeping the LED turned OFF.

The Attiny84 is communicating with the sensor through a logic level converter, since i need to run the Attiny84 from a 3.6v Lipo battery but the sensor is running off a 5v step up module so that i can save power when the sensor is not needed.

Could the issue be the logic level converter?
Or, possibly the power supply for the Sensor and/or Attiny 84.

I attached a very rough drawing of what the circuit looks like but hopefully it could point to a potential fault.
Also I attached the fairly straightforward code I'm using with the Attiny84, all timer related parts are commented out in the NewPing library.

Hope this can be of some help, thanks again.

Have you tried not using the logic level converter? I would guess that a 3.6v trigger would cause the sensor to ping and the Arduino would sense the 3.6v output signal as well.

Tim