Flexible piezoresistive sensors and electrically heated elements as an important part of flexible electronics, due to its wide range of application are studied. In this paper, a low-cost and large-scale manufacturing method to build high-performance sensors and heating elements was proposed. In order to construct a polypyrrole (PPy)/ dopamine (PDA)/cotton fabric, the in-situ polymerization was used to prepare dopamine coated cotton fabrics and to deposit PPy to prepare high performance fabrics. The PPy/PDA/cotton fabric as sensors has an operating range of 0~16 kPa, a sensitivity of up to 60.23 kPa -1 and a minimum detection limit of 64 Pa. It has excellent electric heating performance with a fast temperature rise response of 100 s, a maximum equilibrium temperature of 115.5 ℃ and a thermal stability of 7200 s. The PPy/PDA/cotton fabric can be used to detect minute signals such as pulse movement and human movement with real-time stable heating, which shows the good prospect of PPy/PDA/cotton fabrics in the field of smart wearable devices.