If the input is floating, you always need a pullup or pulldown. Without that, reads will be unpredictable. See pinMode() in reference. But I'm not sure why it would be floating if you're measuring a voltage, unless you didn't connect the grounds....
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.
If the input is floating, you always need a pullup or pulldown. Without that, reads will be unpredictable. See pinMode() in reference. But I'm not sure why it would be floating if you're measuring a voltage, unless you didn't connect the grounds....