Adding slightly modified version of original code, only thing that has changed is the amount of channels (meters) from 2 to 1.