In recent years, the self-assembly of organic molecules has been employed to create complex smart materials. The self-assembly of smart organic molecules, such as molecular machines, could be a feasible bottom-up approach to build a variety of electronic devices. Spiropyran based molecular switches play a key role in the development of photo-responsive smart materials. However, despite research for over a hundred years in the literature on spiropyrans and related compounds, the development of functional electronic devices is still a challenge. The key issue with such functional molecules is to translate the changes that occur in a single molecule to the macroscopic world so that we can experience the result and put it to use. In this thesis...