  Spin defects in solid-state materials are strong candidate systems for
quantum information technology and sensing applications. Here we explore in
details the recently discovered negatively charged boron vacancies ($V_B^-$) in
hexagonal boron nitride (hBN) and demonstrate their use as atomic scale sensors
for temperature, magnetic fields and externally applied pressure. These
applications are possible due to the high-spin triplet ground state and bright
spin-dependent photoluminescence (PL) of the $V_B^-$. Specifically, we find
that the frequency shift in optically detected magnetic resonance (ODMR)
measurements is not only sensitive to static magnetic fields, but also to
temperature and pressure changes which we relate to crystal lattice parameters.
Our work is important for the future use of spin-rich hBN layers as intrinsic
sensors in heterostructures of functionalized 2D materials.
