In this project we will simulate a parking lot with 9 available parking spaces that is shown on a 7-segment display. This example can be found by the examples provided in the simulator. When the library and serial communication code is present it’s easy to simulate your project.
The library that we installed with the simulator is available in the Arduino IDE. By adding the ‘#include <ServoSim.h>’ and ‘#include <SimulatorProgram.h>’code we will include the library for the simulator to it. The library will communicate with the Arduino Simulator thought the serial USB port.
Select the used inputs and outputs on the simulator. In this case we use an 7-segment on digital pins 2-8 and 2 buttons on analog pins A0 (D14) and A1 (D15). The 2 LEDs are on pins 10 and 13. To make the brightness variable use the digital PWM 11 pin on a bargraph with a potentiometer on analog pin A4. The servo barrier is connected on digital pin 12. Connect the Arduino with the COM port in the simulator and start simulating.
You can restore saved setups by going under File and choose for ‘Restore settings’. Select the setup file and all the saved settings will be restored.