The present invention relates to an electronic gastrointestinal capsule protected by an outer biocompatible shell resistant to the environment in the digestive system comprising a light source (4); splitting means (5) to split the light beam, directing it to the reference arm (6) and the sampling arm (9); an adjustable group delay element (24) depending on the distance to the tissue to analyse; optical moving means moving the intersection of the light beam (30) of the sampling arm (9) across the tissue; an optical system (8) focusing the light beam (30) from the sampling arm (9) on the tissue; interference means (10) producing interference between the reflected light; a detector (11) receiving said interference; processing means (2) processing the information acquired by the detector (11); and power supply means (3) supplying power to the capsule without a physical connection to the outside.