IDE is (still) responsive, and so so is Espruino. But:
It looks like that your code makes Espruino so busy, that only little is left to answer your terminal input. Try to time a single run. It will tell you whether 3 seconds are enough to take the readings, process them, and display the consolidated value on your display. Just for the sake of this theory, choose 10 seconds (10000 ms), and watch the terminal interaction behavior then.
You can visualize how busy Espruino is by putting LED3.set() as your first expression in your MedianRead() function, and LED3.reset() as your last. If the LED3 is on (for you eye) all the time, 3 seconds is not enough to go through with all your code.
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.
IDE is (still) responsive, and so so is Espruino. But:
It looks like that your code makes Espruino so busy, that only little is left to answer your terminal input. Try to time a single run. It will tell you whether 3 seconds are enough to take the readings, process them, and display the consolidated value on your display. Just for the sake of this theory, choose 10 seconds (10000 ms), and watch the terminal interaction behavior then.
You can visualize how busy Espruino is by putting LED3.set() as your first expression in your MedianRead() function, and LED3.reset() as your last. If the LED3 is on (for you eye) all the time, 3 seconds is not enough to go through with all your code.