VBat (or 5V/Vcc on the Pico) is either the power the comes from USB via a diode (so around 4.5v), or if you've got a battery plugged in it's battery power (without any diode voltage drop).
It should be enough for the sensor though - it works great for the HC-SR04. It's actually possible the sensor is picking up a reflection from the desktop - if so, 4cm sounds about right.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Great, glad it's working(ish).
VBat (or 5V/Vcc on the Pico) is either the power the comes from USB via a diode (so around 4.5v), or if you've got a battery plugged in it's battery power (without any diode voltage drop).
It should be enough for the sensor though - it works great for the HC-SR04. It's actually possible the sensor is picking up a reflection from the desktop - if so, 4cm sounds about right.