By potential cycling (with in specific potential limits), by chronoamperometry (holding at one specific potential). but in this way you will get islands of deposited polymer, could not get smooth monolayers. for smooth monolayers you have to use UPD method in which you will select one material which can be replace by your desired polymer and deposit its layers first and then in second step deposit your desired polymer.
Several EC methods can be used for the preparation of conducting polymer films or particles via electropolymerization: 1) sucsessive CVs, 2) constant potential mode and 3) constant current. Cyclic volmmetry might be mostly direct and easily to be monitored. There are a great body of documents which you can take a look at. Several years ago, we did controlled formation of Polythiophene Nanoparticles (attached). The key factors include: the monomer concentration, the CV potential window applied, scan rate and electrolyte. You need to optimize these paramters to obtain the best films. In addition, the pretreatment of ITO surfaces might also be helpful, in order to have good adhesion of polymer films on the electrode surface.
If you want to polymerizing aniline as monomer by electrochemical methods, I recommend you check out my articles on the electropolymerization of pyrrole, as well as articles of Mr PC LACAZE on aniline. You will find all information on this subject.
you can try to synthesize polyaniline on platinum using aniline (distilled before use if the monomer is dark) in dilute acid, using cyclic voltammetry and note that the voltammogram increases in each cycle you'll be fine. observe a beautiful emerald color, this is polyaniline.