working correctly now, just very jumpy when being used with multiple channels on one, probably due to slower speed than arduino (8MHz vs. 16MHz clock)