var arr = new Uint16Array(100); for (var i=0;i<arr.length;i++) arr[i]=analogRead(INPUT_PIN)*65536; arr.sort(); result = arr[arr.length/2]/65536;
@Gordon started
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.