The aim of this study was to develop flexible sensors with cotton and polyester knit fabrics as substrates coated with polyaniline (PAni) doped with hydrochloric acid or phosphoric acid. The deposition of PAni onto the knit, polymerization synthesis, and doping of the aniline monomer were performed via an in situ reaction. Graphite dispersion was used to obtain the electrodes of the sensors, which were prepared differently for each substrate. The main evaluation of the sensors was carried out in a humidity chamber under nitrogen (N2) with the application of drying and wetting cycles. Significant differences were observed in the responses of the sensory devices to humidity, according to the dopant and substrate types. In all tests, the sensor response to variations in the ambient conditions was very good, with a rapid response to changes in the relative humidity, a good sensitivity (up to 34%), and a high reversibility (ca. 70–100%). © 2017 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2017, 134, 44785.