Electromagnetic nanonetworks for sensing and drug delivery