modularized functions for reading data off Arduino