In this work, we calculate the photonic band structure for a defective two-dimensional photonic crystal with a star defect using the plane wave expansion method and supercell technique. The photonic crystal is composed of triangular scatterers distributed in a honeycomb lattice with an air background. For transverse magnetic polarization, a defect mode was identified in the photonic band gap with the same intensity of the electrical displacement concentrated within the triangles. By calculating the gap map based on triangle lengths, the defect mode is concentrated within the photonic band gap for triangles with lengths of L = 0.48a, wherein a represents the lattice constant. When considering scatterer rotation in the lattice, the photonic band gap is maximized for rotations of θ=π/6, which generates the presence of two defect modes for transverse electric polarization. Finally, regarding the dependence of the refractive index on the applied pressure, the defect mode is tuned at lower frequencies as pressure increases from 0 to 6 GPa.