Mechanotransduction modulates cellular functions as diverse as migration, proliferation, differentiation, and apoptosis. It is crucial for organ development and homeostasis and leads to pathologies when defective. However, despite considerable efforts made in the past, the molecular basis of mechanotransduction remains poorly understood. Here, we have investigated the genetic basis of mechanotransduction in Drosophila. We show that the fly heart senses and responds to mechanical forces by regulating cardiac activity. In particular, pauses in heart activity are observed under acute mechanical constraints in vivo. We further confirm by a variety of in situ tests that these cardiac arrests constitute the biological force-induced response. In order to identify molecular components of the mechanotransduction pathway, we carried out a genetic screen based on the dependence of cardiac activity upon mechanical constraints and identified Painless, a TRPA channel. We observe a clear absence of in vivo cardiac arrest following inactivation of painless and further demonstrate that painless is autonomously required in the heart to mediate the response to mechanical stress. Furthermore, direct activation of Painless is sufficient to produce pauses in heartbeat, mimicking the pressure-induced response. Painless thus constitutes part of a mechanosensitive pathway that adjusts cardiac muscle activity to mechanical constraints. This constitutes the first in vivo demonstration that a TRPA channel can mediate cardiac mechanotransduction. Furthermore, by establishing a high-throughput system to identify the molecular players involved in mechanotransduction in the cardiovascular system, our study paves the way for understanding the mechanisms underlying a mechanotransduction pathway.