A photo-medical capsule that emits blue light for Helicobacter pylori treatment was described in this paper. The system consists of modules for pH sensing and measuring, light-emitting diode driver circuit, radio communication and microcontroller, and power management. The system can differentiate locations by monitoring the pH values of the gastrointestinal tract, and turn on and off the blue light according to the preset range of pH values. Our experimental tests show that the capsule can operate in the effective light therapy mode for more than 32 minutes and the wireless communication module can reliably transmit the measured pH value to a receiver located outside the body.