Executing Code With a Switch

Have you written any sketches yet? If not you should start by running some of the simple example sketches included in the arduino Ide. You should study the code examples to see how the functions work and slowly but steadily you will soon be able to write your own simple sketches. The arduino was never designed to be a plug and play solution for peoples projects, but rather a simple by effective platform where one could acquire the knowledge and experience to create their own projects.