adding sleep functions when reading analog devices
using utility function