When playing with your Arduino and experimenting with features and capabilities you mind find yourself in the following situation: you have a nice idea about a new project, or you want to test an existing one, but you do not have the essential components. You might be missing leds, buttons, a potentiometer even an Ethernet shield, but you still have your sketch ready. Seeing your sketch code compile in the Arduino IDE is not as satisfying as watching it work on your board and you also need to verify that your program logic works. What can you do without the hardware? You can use an Arduino Simulator like the VirtualBreadboard.
VirtualBreadboard is a (unfortunately Windows only) simulation and development environment for Microcontrollers. It supports many of the PIC16 and PIC18 Microcontroller devices and the Arduino platform. In addition it provides a wide variety of simulated components such as LCD’s, Servos, logic and other I/O devices that can be used to model and simulate high level circuits. By simulation environment we mean that you have access to virtual boards and components that you can virtually connect together through an appropriate graphical environment. You can add program code (in a similar way you would compose a sketch), you can compile the code and watch it being executed on the Microcontroller platform and interact with the connected components (LEDs, sensors, actuators) the same way it would if your circuit was real!
Currently VirtualBreadboard supports all the basic sketch examples included in the Arduino IDE. Both the sketch code is available and the essential circuit components (already connected to a virtual Arduino board), like LEDs, buttons, LCDs, Servo motors, etc. to support the virtual execution of the sketches.