{"id":26991556,"url":"https://github.com/maklonfr/iot-traffic-light","last_synced_at":"2026-04-27T08:31:36.802Z","repository":{"id":285992857,"uuid":"960010105","full_name":"MaklonFR/IoT-Traffic-Light","owner":"MaklonFR","description":"Traffic Light Controller with MicroPython","archived":false,"fork":false,"pushed_at":"2025-04-03T18:03:55.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T16:17:57.607Z","etag":null,"topics":["iot-application","micropython","python","rasberry-pi","trafic-light"],"latest_commit_sha":null,"homepage":"","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/MaklonFR.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":"2025-04-03T17:59:20.000Z","updated_at":"2025-04-03T18:03:59.000Z","dependencies_parsed_at":"2025-04-03T19:21:43.662Z","dependency_job_id":"adfeab7d-849f-46c5-afa6-f6e2ae5e9da7","html_url":"https://github.com/MaklonFR/IoT-Traffic-Light","commit_stats":null,"previous_names":["maklonfr/traffic-light-rpl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaklonFR%2FIoT-Traffic-Light","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaklonFR%2FIoT-Traffic-Light/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaklonFR%2FIoT-Traffic-Light/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaklonFR%2FIoT-Traffic-Light/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaklonFR","download_url":"https://codeload.github.com/MaklonFR/IoT-Traffic-Light/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"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":["iot-application","micropython","python","rasberry-pi","trafic-light"],"created_at":"2025-04-03T22:16:08.950Z","updated_at":"2026-04-27T08:31:36.743Z","avatar_url":"https://github.com/MaklonFR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traffic Light Controller with MicroPython\n\nYoutube Link:\nhttps://www.youtube.com/shorts/b71Qk9Rgh4Y\n\n## Overview\nThis project is a simple traffic light controller implemented using MicroPython. It controls LEDs to simulate traffic signals for four different lanes.\n\n## Hardware Requirements\n- A microcontroller that supports MicroPython (e.g., Raspberry Pi Pico, ESP32)\n- LEDs (Red, Yellow, Green) for each lane\n- Resistors (220Ω recommended)\n- Breadboard and jumper wires\n\n## Wiring Configuration\nEach lane has three LEDs (Red, Yellow, Green) connected to specific GPIO pins:\n\n| Lane   | Red Pin | Yellow Pin | Green Pin |\n|--------|--------|------------|-----------|\n| Jalur 1 | 1      | 2          | 3         |\n| Jalur 2 | 5      | 8          | 9         |\n| Jalur 3 | 10     | 11         | 12        |\n| Jalur 4 | 13     | 14         | 15        |\n\n## Code Explanation\n- The `traffic_lights` dictionary stores the GPIO pin configuration for each lane.\n- The `all_red()` function ensures that all lanes start with a red signal.\n- The `traffic_cycle(jalur)` function controls the signal timing:\n  - Sets all lights to red\n  - Turns green for the selected lane for 5 seconds\n  - Changes to yellow for 2 seconds before switching back to red\n- The `while True` loop cycles through all four lanes in sequence.\n\n## Usage\n1. Load the script onto your MicroPython-compatible board.\n2. Connect the LEDs and power up the board.\n3. The traffic lights will cycle automatically.\n\n## Future Improvements\n- Add pedestrian crossing functionality\n- Implement sensors for traffic density detection\n- Integrate with IoT for remote monitoring\n\n## License\nThis project is open-source and free to use for educational and personal projects.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaklonfr%2Fiot-traffic-light","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaklonfr%2Fiot-traffic-light","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaklonfr%2Fiot-traffic-light/lists"}