For this project we made a parking lot with 9 available parking spots, the 7-segment display will show the amount of available places. The 2 LEDs will indicate the status. The steps are shown in the video above.
Select the used inputs and outputs on the simulator. In this case we use 2 LEDs (1 green and 1 red) on digital pins 10 and pin 13. There are 2 buttons connected on digital 8 and 9. The 7-segment display uses digital pins 0 to 6. The servo barrier is connected to digital pin 12. We use a potentiometer on analog pin A0 to dim the brightness of the 7-segment LEDs. PWM pin 11 shows the brightness. Connect the Arduino with the COM port in the simulator and start simulating.
Adjust the codes with a capital letter so that they can be used by the library. digitalWrite becomes DigitalWrite. myservo.write becomes myservowrite without a dit (.). Then upload your code and start the simulation.
The sketch is available in a zip file on this page.
The instructions that communicate with the simulator are based on similar Arduino codes. Only the first letter needs to be replaced by a capital letter, remove the dot in the instruction with a dot ‘.’ and your ready to simulate.
The simulator library codes are as follows:
digitalWrite becomes DigitalWrite
lcd.print becomes lcdprint
Instructions Arduino IDE Instructions Arduino IO Simulator
tone(x,y ,z); Tone(x,y ,z);