Notice that too... before first analogRead(), the pin was not floating because initialized as input with pulled-down. Afterwards, it jumped all over the place... Since I needed a digitalRead() for good and the analogRead() only temporarily to figure out some resistor network, I did a pull-down with the digitalRead(). The digitalRead() 's pull-down will stay.
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.
Notice that too... before first analogRead(), the pin was not floating because initialized as input with pulled-down. Afterwards, it jumped all over the place... Since I needed a digitalRead() for good and the analogRead() only temporarily to figure out some resistor network, I did a pull-down with the digitalRead(). The digitalRead() 's pull-down will stay.