{"id":24266844,"url":"https://github.com/a3ro-dev/sentinel-x","last_synced_at":"2026-06-10T14:31:51.357Z","repository":{"id":270967826,"uuid":"911981622","full_name":"a3ro-dev/Sentinel-X","owner":"a3ro-dev","description":"a autonomous robot control system using an ESP32 microcontroller. The robot features dual motor control, servo steering, and ultrasonic obstacle detection.","archived":false,"fork":false,"pushed_at":"2025-11-05T06:54:43.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-05T08:24:40.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/a3ro-dev.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":"2025-01-04T11:25:24.000Z","updated_at":"2025-11-05T06:16:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"db0aa9d7-f85d-449e-9e2c-daa76ad35f84","html_url":"https://github.com/a3ro-dev/Sentinel-X","commit_stats":null,"previous_names":["a3ro-dev/sentinel-x"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/a3ro-dev/Sentinel-X","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3ro-dev%2FSentinel-X","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3ro-dev%2FSentinel-X/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3ro-dev%2FSentinel-X/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3ro-dev%2FSentinel-X/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a3ro-dev","download_url":"https://codeload.github.com/a3ro-dev/Sentinel-X/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3ro-dev%2FSentinel-X/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34157453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-01-15T11:28:19.633Z","updated_at":"2026-06-10T14:31:51.345Z","avatar_url":"https://github.com/a3ro-dev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentinel-X\n\nThis project implements a autonomous robot control system using an ESP32 microcontroller. The robot features dual motor control, servo steering, and ultrasonic obstacle detection.\n\n## Hardware Requirements\n\n- ESP32 microcontroller\n- 2 DC motors with H-bridge driver\n- Servo motor\n- HC-SR04 ultrasonic sensor\n- Power supply\n\n## Pin Configuration\n\n```\nMotors:\n- IN1: GPIO18 (Motor 1)\n- IN2: GPIO5\n- IN3: GPIO15 (Motor 2) \n- IN4: GPIO2\n- EN1: GPIO19 (PWM)\n- EN2: GPIO21 (PWM)\n\nServo:\n- SERVO: GPIO4 (PWM)\n\nUltrasonic Sensor:\n- TRIG: GPIO12\n- ECHO: GPIO14\n```\n\n## Features\n\n- Basic movement controls (forward, backward, left, right)\n- **Enhanced Algorithm Features:**\n  - Exponential Moving Average (EMA) filtering for smoother distance measurements\n  - Median filtering for robust outlier rejection\n  - Weighted path scoring that prefers forward direction\n  - Path width estimation for better navigation decisions\n  - Adaptive safe distance based on current speed\n  - Proportional steering for smoother, more natural turns\n  - Predictive obstacle avoidance using approach rate calculation\n  - Adaptive servo sweep density based on obstacle proximity\n- Intelligent obstacle detection and avoidance with multi-angle scanning\n- Hardware initialization and validation\n- Error handling and recovery with error threshold\n- Speed control via PWM with differential turning\n- Continuous servo scanning for improved obstacle detection\n\n## Operation\n\nThe robot:\n1. Initializes all hardware components (motors, servo, ultrasonic sensor)\n2. Continuously sweeps the servo between 45° and 135° with adaptive step size:\n   - Slower, denser scanning (2° steps) when obstacles are close (\u003c 50cm)\n   - Normal scanning (3° steps) at medium distances (50-100cm)\n   - Faster scanning (5° steps) when path is clear (\u003e 100cm)\n3. Takes 3 distance readings per measurement with advanced filtering:\n   - Uses median of readings for outlier rejection\n   - Applies Exponential Moving Average (EMA) for smoothing\n   - Validates readings within HC-SR04 range (2-400cm)\n4. Calculates adaptive safe distance based on:\n   - Current robot speed (higher speed = larger safe distance)\n   - Approach rate (detects rapidly closing obstacles)\n   - Increases buffer distance when approaching obstacles quickly\n5. If an obstacle is detected within adaptive safe distance:\n   - Stops immediately\n   - Backs up for 500ms\n   - Performs a three-angle scan (45°, 90°, 135°) to find the clearest path\n   - Calculates weighted scores for each path (prefers forward direction)\n   - Estimates path width from left and right measurements\n   - If no clear path is found (\u003c 35cm in all directions), backs up for 1000ms\n   - Otherwise, applies proportional steering toward the best direction\n6. Proportional steering provides smooth, natural turns instead of sharp binary turns\n7. Uses the last valid distance reading if current measurement fails\n\n## Error Handling\n\n- The system performs 3 ultrasonic readings per measurement for accuracy\n- Advanced filtering pipeline:\n  - Median filtering for robust outlier rejection\n  - Exponential Moving Average (EMA) smoothing for noise reduction\n  - Validates readings to ensure they're within HC-SR04 range (2-400cm)\n- Hardware initialization checks all components before operation\n- Main loop includes error recovery with a maximum error threshold (5 errors)\n- System will safely stop if too many consecutive errors occur\n- Emergency turn performed on error recovery\n- Graceful degradation: uses last valid reading if current measurement fails\n\n## Usage\n\nUpload `ota/car.py` to an ESP32 with MicroPython installed. The code will run automatically on boot.\n\nThe robot will autonomously navigate while avoiding obstacles. No additional user input is required during operation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa3ro-dev%2Fsentinel-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa3ro-dev%2Fsentinel-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa3ro-dev%2Fsentinel-x/lists"}