Localization of microscale devices in vivo using addressable transmitters operated as magnetic spins