Text this: High-sensitivity capsule-shaped sensor based on 2D photonic crystals