a, b, Schematic illustration (a) and the photograph (b) of the application of integrated perovskite light source and detector in one chip to be used in heart pulse monitor. c, The waveforms of the heart pulse obtained using the commercial and perovskite sensors. d, The enlarged waveform of the heart pulse monitored using the commercial and perovskite sensors, which can clearly show the systolic peak and diastolic notch of the pulse signal. e, Schematic illustration of using the dual-functional perovskite diode as the transmitter and receiver in a bidirectional communication system for analogue and digital signals. f, The photograph of the user interface of the bidirectional optical communication system using dual-functional perovskite diodes as the transmitter and receiver. The chat bubbles were later-added to guide the eye. g, Waveforms of transmitted and received audio analogue signals in the optical communication demonstration system with two inter-chip dual-functional perovskite diodes as the transmitter and receiver. h, Waveforms of transmitted and received digital signals between these two dual-functional perovskite diodes at bit rates of 1 Mbit/s.