how to measure respiratory rate electronically