New pi-conjugated polymers containing dithieno(3,2-b: 2',3'-d) pyrrole (DTP) were successfully synthesized via electropolymerization. The effect of structural differences on the electrochemical and optoelectronic properties of the 4-[4H-dithieno(3,2-b: 2',3'-d) pyrrol-4-yl] aniline (DTP-aryl-NH2), 10-[4H-dithiyeno(3,2-b: 2',3'-d) pirol-4-il] dekan-1-amine (DTP-alkyl-NH2), and 1,10-bis[4H-dithieno(3,2-b:2',3'-d) pyrrol-4-yl] decane (DTP-alkyl-DTP) were investigated. The corresponding polymers were characterized by cyclic voltammetry, NMR (H-1-NMR and C-13-NMR), and ultraviolet-visible spectroscopy. Changes in the electronic nature of the functional groups led to variations in the electrochemical properties of the pi-conjugated systems. The electroactive polymer films revealed redox couples and exhibited electrochromic behavior. The replacement of the DTP-alkyl-DTP unit with DTP-aryl-NH2 and DTP-alkyl-NH2 resulted in a lower oxidation potential. Both the poly(10-(4H-Dithiyeno[3,2-b: 2',3'-d] pirol-4-il) dekan-1-amin) (poly( DTP-alkyl-NH2)) and poly(1,10-bis(4H-dithieno[3,2-b: 2',3'-d] pyrrol-4-yl) decane) (poly(DTP-alkyl-DTP)) films showed multicolor electrochromism and also fast switching times (<1 s) in the visible and near infrared regions. (c) 2014 Wiley Periodicals, Inc.