Digital pills are using sensors and cameras to help doctors get a new understanding of their patients.