The technique for studying swarms of electrons in a gas discharge by observing the photon flux from the discharge, has been adapted to investigate the role of the secondary mechanisms in hydrogen and nitrogen. The results show that, contrary to previous indications, ion bombardment of the cathode plays only a negligible, if any, part in the low pressure discharge in hydrogen and nitrogen at low E/N, while at high E/N only the contribution of the atomic ion is significant.