The Internet of Things (IoT)1,2 employs a large number of spatially distributed wireless sensors to monitor physical environments, e.g., temperature, humidity, and air pressure, and has many applications, including environmental monitoring3, health care monitoring4, smart cities5, and precision agriculture. A wireless sensor can collect, analyze, and transmit measurements of its environment1,2. Currently, wireless sensors used in the IoT are predominately based on electronic devices that may suffer from electromagnetic interference in many circumstances. Being immune to the electromagnetic interference, optical sensors provide a significant advantage in harsh environments6. Furthermore, by introducing optical resonance to enhance light–matter interactions, optical sensors based on resonators exhibit small footprints, extreme sensitivity, and versatile functionalities7,8, which can significantly enhance the capability and flexibility of wireless sensors. Here we provide the first demonstration of a wireless photonic sensor node based on a whispering-gallery-mode (WGM) optical resonator, in which light propagates along the circular rim of such a structure like a sphere, a disk, or a toroid by continuous total internal reflection. The sensor node is controlled via a customized iOS app. Its performance was studied in two practical scenarios: (1) real-time measurement of the air temperature over 12 h and (2) aerial mapping of the temperature distribution using a sensor node mounted on an unmanned drone. Our work demonstrates the capability of WGM optical sensors in practical applications and may pave the way for the large-scale deployment of WGM sensors in the IoT.