A medical capsule is equipped with a sensor device having light emitting and light receiving elements. The sensor device can detect blood on the basis of light absorption properties of the blood. The capsule has a casing forming a recess or gap at its outer surface. The recess has a pre-selected width which represents a fixed measuring track between the light emitting and light receiving elements being arranged at opposing sides of the recess or gap when seen in its width direction. The medical capsule also has a shielding plate/layer/membrane arranged at least at or near the bottom of the recess or gap and extending along the width direction of the recess or gap preferably to exceed the recess at both sides into its width direction to prohibit emitted light from bypassing the recess via the casing material of the capsule.