audio spectrum analyzer Dmd p10 problem

You know without details of the hardware the software means nothing.

However I would expect at least to see your arrays dimensioned at 32 rather than 16.