Optimized the polling task.

The same data array is now used on polling, less memory is used.

Readbyte now uses switch statements to select data to insert into array.
Added smoothing