New sensor could help prevent sunburns.