Memory creep any suggestions?

samarkh:
I seem to be suffering memory creep

Do you mean you consume a bit more memory after ever loop?

If so one way to find out what is happening is to simplify your program bit by bit. For example take out averageing() and see if THAT gives you memory creep problems. Then take out webServer() and see if THAT gives you problems.

Do this on a copy of your program so that when you find the culprit you can correct it in your original.

It may be neither, but it would be good to eliminate them.