Sensors are everywhere, from your phone to your medicine cabinet. Here’s how they turn events in the physical world into words and numbers.