{"id":23419561,"url":"https://github.com/o2sa/car-parking-system","last_synced_at":"2026-04-29T16:03:36.020Z","repository":{"id":175143823,"uuid":"652615173","full_name":"O2sa/Car-Parking-System","owner":"O2sa","description":"ESP32-based smart parking system with ultrasonic sensors, servo gates, and real-time web monitoring.","archived":false,"fork":false,"pushed_at":"2026-03-13T21:02:58.000Z","size":415,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-14T09:25:49.914Z","etag":null,"topics":["arduino","embedded-systems","esp32","freertos","iot","microcontroller","ultrasonic-sensor"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/O2sa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-12T12:44:46.000Z","updated_at":"2026-03-13T21:06:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"90694024-b5f4-4ccd-8752-da92de04082f","html_url":"https://github.com/O2sa/Car-Parking-System","commit_stats":null,"previous_names":["o2sa/car-parking-system"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/O2sa/Car-Parking-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O2sa%2FCar-Parking-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O2sa%2FCar-Parking-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O2sa%2FCar-Parking-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O2sa%2FCar-Parking-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/O2sa","download_url":"https://codeload.github.com/O2sa/Car-Parking-System/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O2sa%2FCar-Parking-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32432917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","embedded-systems","esp32","freertos","iot","microcontroller","ultrasonic-sensor"],"created_at":"2024-12-23T01:18:25.229Z","updated_at":"2026-04-29T16:03:36.013Z","avatar_url":"https://github.com/O2sa.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🚗 Smart Car Parking System with ESP32\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./block.png\" alt=\"System Block Diagram\" width=\"600\"/\u003e\n  \u003cbr\u003e\n  \u003cem\u003eSystem Block Diagram\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e🅿️ An IoT-based smart parking system using an ESP32, ultrasonic sensors, and servo motors.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  This project automates vehicle entry and exit, counts available spaces, and provides a real-time monitoring web server.\n\u003c/p\u003e\n\n## ✨ About The Project\n\nThis is a complete embedded systems project that simulates a real-world parking management system. It uses an **ESP32 microcontroller** to create a local Wi-Fi network and host a web server. Ultrasonic sensors detect vehicles at the entry and exit gates, while servo motors control the physical barriers. The system provides real-time feedback on a web page, displaying the number of available parking spots.\n\n### 🛠️ Built With\n\n*   **Microcontroller:** ESP32\n*   **Sensors:** 2x HC-SR04 Ultrasonic Distance Sensors\n*   **Actuators:** 2x SG90 Micro Servo Motors\n*   **Core Technology:** FreeRTOS (for real-time task management on the ESP32)\n*   **Communication:** Built-in Wi-Fi \u0026 Web Server\n\n## 🚀 Key Features\n\n*   **Automated Gate Control:** Servo motors open and close gates when vehicles are detected.\n*   **Vehicle Counting:** Tracks the number of cars entering and exiting to calculate available spots.\n*   **Real-time Monitoring:** A dedicated web server displays the current parking status on any device connected to the ESP32's network.\n*   **Dual-Sensor Logic:** Uses separate sensors for entry and exit to ensure accurate counting.\n*   **Real-Time Operating System:** Leverages FreeRTOS for reliable and concurrent handling of sensor inputs and server tasks.\n\n## 📦 Hardware Requirements\n\n*   **ESP32** Development Board\n*   **HC-SR04 Ultrasonic Sensor** x2\n*   **SG90 Micro Servo** x2\n*   Small Breadboard\n*   Jumper Wires\n*   Power Supply (5V capable)\n\n## 🔌 Pin Connection Map\n\nConnect the components to your ESP32 exactly as follows:\n\n| Component Pin | Connects to ESP32 Pin |\n| :--- | :--- |\n| **Ultrasonic 1 - Trig** | GPIO 33 |\n| **Ultrasonic 1 - Echo** | GPIO 25 |\n| **Ultrasonic 1 - VCC** | 5V |\n| **Ultrasonic 1 - GND** | GND |\n| **Ultrasonic 2 - Trig** | GPIO 17 |\n| **Ultrasonic 2 - Echo** | GPIO 16 |\n| **Ultrasonic 2 - VCC** | 5V |\n| **Ultrasonic 2 - GND** | GND |\n| **Servo 1 - Signal** | GPIO 32 |\n| **Servo 1 - VCC** | 5V |\n| **Servo 1 - GND** | GND |\n| **Servo 2 - Signal** | GPIO 19 |\n| **Servo 2 - VCC** | 5V |\n| **Servo 2 - GND** | GND |\n\n## 🏁 Getting Started\n\nFollow these instructions to get the project up and running on your own hardware.\n\n### Prerequisites\n\n*   **Arduino IDE** or **PlatformIO** (with ESP32 board support installed).\n*   All hardware components listed above.\n\n### Installation \u0026 Setup\n\n1.  **Clone the repository**\n    ```bash\n    git clone https://github.com/O2sa/Car-Parking-System.git\n    ```\n\n2.  **Open the Code**\n    *   Navigate to the `code/` directory.\n    *   Open the main `.ino` file in your Arduino IDE (or the project in PlatformIO).\n\n3.  **Configure Wi-Fi**\n    *   In the code, find the section for Wi-Fi credentials.\n    *   Replace `ssid` and `password` with your own network name and password.\n\n4.  **Select Board and Port**\n    *   In Arduino IDE, go to `Tools` \u003e `Board` and select your specific ESP32 model.\n    *   Select the correct `Port`.\n\n5.  **Upload the Code**\n    *   Connect your ESP32 via USB.\n    *   Click the `Upload` button.\n\n6.  **Assemble the Circuit**\n    *   Carefully build the circuit on your breadboard following the **Pin Connection Map** above. Double-check all connections, especially power and ground, to avoid damaging components.\n\n7.  **Power Up \u0026 Monitor**\n    *   Once the code is uploaded, open the **Serial Monitor** (Tools \u003e Serial Monitor) to see the ESP32's IP address.\n    *   Open a web browser on any device connected to the same Wi-Fi network and navigate to that IP address to view the parking status.\n\n## 💡 How It Works\n\n1.  **Vehicle Detection:** When a car approaches the entry gate, the first ultrasonic sensor detects it.\n2.  **Gate Control:** The ESP32 signals the entry servo to open the gate.\n3.  **Counting Logic:** Once the car passes the sensor, the system increments the vehicle count (if space is available) and closes the gate. The exit sensor works similarly to decrement the count.\n4.  **Web Server:** The ESP32 hosts a simple web page that displays the current number of available parking spots. This page updates in real-time as vehicles enter and exit.\n\n## 🧪 Simulation\n\nAn online simulation of this project was created with **Circuito.io**. You can find the link in the repository's issues or consider re-sharing it for others.\n\n## 📸 Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./server-shot.png\" alt=\"Web Server Interface Screenshot\" width=\"400\"/\u003e\n  \u003cbr\u003e\n  \u003cem\u003eThe monitoring web server interface.\u003c/em\u003e\n\u003c/p\u003e\n\n## ⚠️ Known Limitations \u0026 Future Ideas\n\n### Current Limitations\n*   **Object vs. Vehicle:** The ultrasonic sensor can detect any object, not just cars. A person or animal could trigger the gate.\n\n### Ideas for Development\n*   **Authentication:** Add an RFID reader or keypad for authorized entry only.\n*   **Enhanced Web Interface:** Create a more advanced control panel to manually operate gates or view logs.\n*   **Cloud Connectivity:** Send data to a cloud platform (like Blynk or AWS IoT) for remote monitoring.\n*   **OLED Display:** Add a small screen to show spot availability directly on the unit.\n*   **Improved Detection Logic:** Implement filtering or use two sensors per gate to better distinguish vehicles.\n\n## 📚 References\n\n1.  Jo, Y., \u0026 Jung, I. (2014). Analysis of vehicle detection with WSN-based ultrasonic sensors. _Sensors_, _14_(8), 14050–14069. [Link to paper]\n2.  Stiawan, R., Kusumadjati, A., Aminah, N. S., Djamal, M., \u0026 Viridi, S. (2019). An ultrasonic sensor system for vehicle detection application. _Journal of Physics: Conference Series_, _1204_, 012017. [Link to paper]\n\n## 🤝 Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion to improve the code, add features, or fix a bug:\n\n1.  Fork the Project\n2.  Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3.  Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4.  Push to the Branch (`git push origin feature/AmazingFeature`)\n5.  Open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2sa%2Fcar-parking-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fo2sa%2Fcar-parking-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2sa%2Fcar-parking-system/lists"}