{"id":25074931,"url":"https://github.com/nathancordeiro/line-follower-robot","last_synced_at":"2026-04-11T08:04:28.815Z","repository":{"id":256613226,"uuid":"800365173","full_name":"NathanCordeiro/Line-Follower-Robot","owner":"NathanCordeiro","description":"Arduino Uno-powered line follower robot: Seamlessly follows lines with precision sensors and intelligent algorithms. Ideal for exploring robotics fundamentals and automation.","archived":false,"fork":false,"pushed_at":"2024-09-11T16:18:57.000Z","size":560,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T00:20:18.672Z","etag":null,"topics":["arduino","cpp","line-follower","robotics"],"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/NathanCordeiro.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}},"created_at":"2024-05-14T07:37:38.000Z","updated_at":"2025-01-26T17:24:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"6595e4c9-91e6-458a-87be-8b3cc91473b8","html_url":"https://github.com/NathanCordeiro/Line-Follower-Robot","commit_stats":null,"previous_names":["nathancordeiro/line-follower-robot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanCordeiro%2FLine-Follower-Robot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanCordeiro%2FLine-Follower-Robot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanCordeiro%2FLine-Follower-Robot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanCordeiro%2FLine-Follower-Robot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NathanCordeiro","download_url":"https://codeload.github.com/NathanCordeiro/Line-Follower-Robot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246531983,"owners_count":20792735,"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":["arduino","cpp","line-follower","robotics"],"created_at":"2025-02-07T00:19:42.065Z","updated_at":"2026-04-11T08:04:23.785Z","avatar_url":"https://github.com/NathanCordeiro.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\n\n\u003ch1 align=\"center\"\u003eLine Follower Robot 🏎️\u003c/h1\u003e\n\n---\n\n\n# Line Follower Robot using Arduino Uno \n\nThis project demonstrates a line follower robot powered by an Arduino Uno. The robot uses infrared (IR) sensors to detect the line and adjust its path accordingly by controlling the motors.\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Components](#components)\n- [Circuit Diagram](#circuit-diagram)\n- [Code Explanation](#code-explanation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contacts](#contacts)\n\n## Introduction\nThe line follower robot is designed to follow a black line on a white surface. It uses five IR sensors to detect the line's position and adjusts its movements by controlling the left and right motors accordingly.\n\n## Components\n- Arduino Uno R3\n- 2 DC Motors with motor driver\n- 5 IR Sensors (individual or array chanel works)\n- Motor driver (L298N or similar)\n- Chassis, wheels, and other mechanical components\n- Jumper wires (breadboard is optional)\n\n## Circuit Diagram\n![Circuit Diagram](./LFR%20circuit%20diagram.png)\n\n## Code Explanation\nThe code is designed to:\n- Read the values from five IR sensors.\n- Determine the position of the line based on the sensor values.\n- Adjust the motor speeds to follow the line correctly.\n\n### Motor Control\n- `motorRPin1`, `motorRPin2`, and `motorREnable` control the right motor.\n- `motorLPin1`, `motorLPin2`, and `motorLEnable` control the left motor.\n\n### IR Sensors\n- The IR sensors are connected to analog pins A0 to A4.\n\n### Functions\n- `scanD()`: Reads the IR sensor values.\n- `check()`: Determines the robot's movement based on the sensor values.\n- `rightS()`, `leftS()`, `go()`, `stopme()`: Control the motors to turn right, turn left, move forward, and stop respectively.\n\n### Inbuilt Functions\n-  `analogWrite()`: Allows you to write a an analog value (a pulse-width-modulation wave) to a specific pin.\n     ```INO\n      Syntax:\n      analogWrite(pin, value)\n      Parameters:\n      Pin - Pin to write to allowed to be an int only\n      value -  The duty cycle, ranging from 0 to 255 \n     ```\n-  `digitalWrite()`: Allows you to control the state of a digital pin, can be set to either HIGH(5v)  or LOW(0v).\n     ```INO\n      Syntax:\n      digitalWrite(pin, value)\n      Parameters:\n      Pin - The arduino pin number\n      value - Either HIGH or LOW\n     ```\n-  `bitWrite()`: Allows you to modify a specific bit of a numeric variable.\n     ```INO\n      Syntax:\n      bitWrite(x, n, b)\n      Parameters:\n      x - The numeric variable to which you want to write\n      n - The bit position\n      b - The value to write to the specified bit either 0 or 1\n     ```\n\n## Usage\n1. **Assemble the Hardware**:\n   - Connect the IR sensors to the analog pins A0 to A4 on the Arduino.\n   - Connect the motor driver to the Arduino and the motors.\n   - Power the Arduino and motor driver.\n\n2. **Upload the Code**:\n   - Upload the provided code to the Arduino Uno using the Arduino IDE.\n\n3. **Run the Robot**:\n   - Place the robot on a track with a black line on a white surface.\n   - The robot will follow the line autonomously.\n\n## Contributing\nWe welcome contributions to improve the project. Here’s how you can contribute:\n- Fork the repository.\n- Create a new branch (`git checkout -b feature-branch`).\n- Commit your changes (`git commit -am 'Add new feature'`).\n- Push to the branch (`git push origin feature-branch`).\n- Create a new Pull Request.\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contacts\n   Nathan Cordeiro \n   ```sh\n   https://github.com/NathanCordeiro\n   ```\n    \n   Sanika Naik\n   ```sh\n   https://github.com/SanikaKNaik\n   ```\n\n   Vaidehi Kolhatkar\n   ```sh\n   https://github.com/VaidehiKolhatkar\n   ```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathancordeiro%2Fline-follower-robot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathancordeiro%2Fline-follower-robot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathancordeiro%2Fline-follower-robot/lists"}