• The bare wire is the electrical connection to the shield. You should connect it to signal GND at one end (the Espruino) and leave it unconnected at the other end.
    To reduce noise on the analog inputs you could add an RC low pass filter. A resistor in series with the wire and a ceramic capacitor from the analog input to signal GND.
    To filter out noise and get more stable readings I use to collect a series of at least five readings, throw out the two highest and the two lowest readings and use the remaining reading (the median value). There will always be the jitter caused by the 12 bit ADC, but you can reduce it by taking for example eight readings, throwing out the two highest and two lowest values and calculating the average of the remaining four values..

About

Avatar for tage @tage started