{"id":23726568,"url":"https://github.com/codenkoffee/gas-leakage-alert-system","last_synced_at":"2026-02-16T06:30:16.389Z","repository":{"id":263298725,"uuid":"889833958","full_name":"CodeNKoffee/gas-leakage-alert-system","owner":"CodeNKoffee","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-17T17:58:00.000Z","size":11641,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T00:33:42.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeNKoffee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-17T11:11:29.000Z","updated_at":"2024-11-17T17:58:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca4ba71c-9f3e-4fe0-a7cb-0239cccfcd73","html_url":"https://github.com/CodeNKoffee/gas-leakage-alert-system","commit_stats":null,"previous_names":["codenkoffee/gas-leakage-alert-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeNKoffee%2Fgas-leakage-alert-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeNKoffee%2Fgas-leakage-alert-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeNKoffee%2Fgas-leakage-alert-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeNKoffee%2Fgas-leakage-alert-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeNKoffee","download_url":"https://codeload.github.com/CodeNKoffee/gas-leakage-alert-system/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239824979,"owners_count":19703199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-31T00:32:12.715Z","updated_at":"2026-02-16T06:30:16.344Z","avatar_url":"https://github.com/CodeNKoffee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gas Leakage Alert System Using Raspberry Pi Pico and Laptop\n\n## Project Overview\n\nThis project is designed to detect gas leakage using a Raspberry Pi Pico and a gas sensor. When gas levels exceed a certain threshold, the system sends a signal to a connected laptop, which plays an alert sound and displays a warning on the LCD (optional).\n\n## Components Required\n\n- Raspberry Pi Pico\n- MQ-2 or MQ-5 gas sensor module\n- Laptop (for running the alert script)\n- Breadboard and jumper wires\n- USB cable for connecting the Pico to the laptop\n- LCD (optional, if displaying messages is needed)\n\n## Hardware Setup\n\n1. **Gas Sensor Wiring**:\n\n   - Connect the analog output pin of the gas sensor to the `GP26` pin on the Raspberry Pi Pico.\n   - Connect `VCC` of the gas sensor to `3.3V` or `5V` on the Pico.\n   - Connect `GND` of the sensor to the ground pin on the Pico.\n\n2. **Connect the Raspberry Pi Pico to the Laptop**:\n   - Use a micro USB cable to connect the Pico to the laptop for both power and data transfer.\n\n## Software Installation and Setup\n\n1. **MicroPython Setup**:\n\n   - Install MicroPython on the Raspberry Pi Pico using the [official MicroPython installation guide](https://micropython.org/download/rp2-pico/).\n\n2. **Upload MicroPython Code**:\n\n   - Open Thonny IDE.\n   - Copy the content of `pico_gas_reader.py` into Thonny.\n   - Save and upload the code to the Pico.\n\n3. **Install Python Packages on Laptop**:\n   - Ensure Python is installed on your laptop.\n   - Install the `playsound` package by running:\n\n     ```bash\n     pip install playsound\n     ```\n\n## Running the System\n\n1. **Run the MicroPython Script**:\n\n   - Ensure the Raspberry Pi Pico is connected to the laptop.\n   - The Pico will start reading gas levels and sending signals if gas is detected.\n\n2. **Run the Laptop Script**:\n\n   - Run `laptop_alert_listener.py` on your laptop:\n\n     ```bash\n     python laptop_alert_listener.py\n     ```\n\n   - Ensure `alert_sound.mp3` is in the same directory or provide the correct path.\n\n## Usage Notes\n\n- Test and calibrate the threshold value to ensure proper gas detection.\n- Replace the COM port in the laptop script with the appropriate port detected by your system.\n\n## Future Enhancements\n\n- Add more sensors (e.g., temperature) for extended safety monitoring.\n- Implement a more sophisticated sound alert or integrate with smart home systems for automatic safety measures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenkoffee%2Fgas-leakage-alert-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenkoffee%2Fgas-leakage-alert-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenkoffee%2Fgas-leakage-alert-system/lists"}