{"id":25487821,"url":"https://github.com/abhiramhande/csf366","last_synced_at":"2026-04-15T13:34:17.604Z","repository":{"id":273234597,"uuid":"919046814","full_name":"AbhiramHande/CSF366","owner":"AbhiramHande","description":"Code repository for a Robotics project undertaken under Prof. Sudeept Mohan, Dept. of Computer Science and Information Systems, BITS Pilani, as part of the course CS F366 - Laboratory Project.","archived":false,"fork":false,"pushed_at":"2025-02-17T22:49:41.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T23:29:54.369Z","etag":null,"topics":["jetson-nano","raspberry-pi","robotics"],"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/AbhiramHande.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-01-19T15:20:27.000Z","updated_at":"2025-02-17T22:49:44.000Z","dependencies_parsed_at":"2025-02-07T14:24:34.000Z","dependency_job_id":"fdf9a6fc-0974-4d1d-86be-43c637c7267f","html_url":"https://github.com/AbhiramHande/CSF366","commit_stats":null,"previous_names":["abhiramhande/csf366"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiramHande%2FCSF366","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiramHande%2FCSF366/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiramHande%2FCSF366/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiramHande%2FCSF366/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbhiramHande","download_url":"https://codeload.github.com/AbhiramHande/CSF366/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239544176,"owners_count":19656509,"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":["jetson-nano","raspberry-pi","robotics"],"created_at":"2025-02-18T20:28:06.560Z","updated_at":"2025-11-08T01:30:31.668Z","avatar_url":"https://github.com/AbhiramHande.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laboratory Project - CS F366\n\nThis repository is for a **Robotics project** undertaken under Prof. Sudeept Mohan, Dept. of Computer Science and Information Systems, BITS Pilani, as part of the course **CS F366 - Laboratory Project**.\n\n---\n\n## **Bash Code: `script.sh`**\n\nThis is the `script.sh` bash script that you can use to update the local directory with the latest code from your GitHub repository and run the program. The script is stored in the repository to be restored in case it gets accidentally deleted from your Raspberry Pi.\n\n```bash\n#!/bin/bash\n\nREPO_URL=\"https://github.com/AbhiramHande/CSF366\"        # URL to GitHub repository\nREPO_DIR=\"/home/pi/Project/source_code\"                  # Path to your local repository\nBRANCH=\"main\"                                            # Branch you want to update\n\nclone_repository(){\n    echo \"Cloning GitHub repository...\"\n    git clone \"$REPO_URL\" \"$REPO_DIR\"\n}\n\ncheck_and_navigate_to_directory() {\n    if [ ! -d \"$REPO_DIR\" ]; then\n        echo \"Error: Directory does not exist. Cloning repository.\"\n        clone_repository\n    fi\n    cd \"$REPO_DIR\" || { \n        echo \"Error: Failed to navigate to $REPO_DIR\";\n        exit 1;\n    }\n}\n\nupdate_repository() {\n    echo \"Pulling the latest changes from the repository...\"\n    git fetch --all\n    git reset --hard origin/\"$BRANCH\"\n    git clean -fd\n    echo \"Repository updated successfully.\"\n}\n\nrun_program() {\n    echo \"Finding bash file to execute the program...\"\n    NUM_SH_FILES=$(ls -1 *.sh | wc -l)\n    if [ \"$NUM_SH_FILES\" -eq 0 ]; then\n        echo \"No bash file found.\"\n        exit 1\n    elif [ \"$NUM_SH_FILES\" -eq 1 ]; then\n    \tSCRIPT=$(ls -1 *.sh)\n    \techo \"Running $SCRIPT...\"\n        chmod +x \"$SCRIPT\"\n        ./\"$SCRIPT\"\n    else\n        echo \"Multiple script files found: Kindly select the relevant one.\"\n        ls -1 *.sh\n        read -p \"Enter the script number you want to run: \" INPUT\n        \n\tif [ \"$INPUT\" -lt 1 ] || [ \"$INPUT\" -gt \"$NUM_SH_FILES\" ]; then\n\t    echo \"Error: Invalid input.\"\n\t    exit 1\n\telse\n\t    SCRIPT=$(ls -1 *.sh | head -n \"$INPUT\" | tail -1)\n\t    echo \"Running $SCRIPT...\"\n\t    chmod +x \"$SCRIPT\"\n\t    ./\"$SCRIPT\"\n\tfi\n    fi\n}\n\nmain() {\n    check_and_navigate_to_directory\n    update_repository\n    run_program\n}\n\nmain\n```\n\n---\n\n## **Usage**\n1. **Create a `script.sh` file:**\n   Open the script in your text editor to configure it:\n   ```bash\n   nano script.sh\n   ```\n   Update the following variables as needed:\n   - `REPO_URL`: URL of your GitHub repository.\n   - `REPO_DIR`: Path to the local directory where the repository is stored.\n   - `BRANCH`: The branch to pull updates from.\n   - `EXECUTABLE`: The name of the program you want to run.\n\n2. **Make the script executable:**\n   ```bash\n   chmod +x script.sh\n   ```\n\n3. **Run the script:**\n   ```bash\n   ./script.sh\n   ```\n\n---\n\n## **Prerequisites**\n- Raspberry Pi with Raspberry Pi OS (or any Linux distribution) installed.\n- Python 3 installed (for running Python programs).\n- Git installed on the Raspberry Pi:\n  ```bash\n  sudo apt update \u0026\u0026 sudo apt install git\n  ```\n\n---\n\n## **Currently Working On:**\n- Controlling the GPIO pins of the Raspberry Pi.\n- Using the LM298 Motor driver to control the movement of the robot.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhiramhande%2Fcsf366","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhiramhande%2Fcsf366","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhiramhande%2Fcsf366/lists"}