{"id":30290295,"url":"https://github.com/devanshtangri/iot-camera-bot","last_synced_at":"2026-04-11T02:53:03.369Z","repository":{"id":307628886,"uuid":"1030162021","full_name":"devanshtangri/IoT-Camera-Bot","owner":"devanshtangri","description":"A DIY Raspberry Pi-powered robot car controlled through a web browser interface with real-time video streaming. Built using Flask, WebSockets, GPIO, and Picamera2 — no external controllers or apps needed!","archived":false,"fork":false,"pushed_at":"2025-08-11T14:00:38.000Z","size":9438,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T15:12:08.975Z","etag":null,"topics":["flask","iot","linux","night-vision","night-vision-camera","python3","raspberry-pi","raspberrypi","remote-control","web-controlled-robot","website","wifi"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/devanshtangri.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}},"created_at":"2025-08-01T07:25:21.000Z","updated_at":"2025-08-11T14:00:42.000Z","dependencies_parsed_at":"2025-08-01T10:06:52.463Z","dependency_job_id":null,"html_url":"https://github.com/devanshtangri/IoT-Camera-Bot","commit_stats":null,"previous_names":["devanshtangri/iot-camera-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devanshtangri/IoT-Camera-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshtangri%2FIoT-Camera-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshtangri%2FIoT-Camera-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshtangri%2FIoT-Camera-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshtangri%2FIoT-Camera-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devanshtangri","download_url":"https://codeload.github.com/devanshtangri/IoT-Camera-Bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devanshtangri%2FIoT-Camera-Bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781393,"owners_count":24643820,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":["flask","iot","linux","night-vision","night-vision-camera","python3","raspberry-pi","raspberrypi","remote-control","web-controlled-robot","website","wifi"],"created_at":"2025-08-16T23:12:17.053Z","updated_at":"2026-04-11T02:53:03.363Z","avatar_url":"https://github.com/devanshtangri.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT-Camera-Bot\nA DIY Raspberry Pi-powered robot car controlled through a web browser interface with real-time video streaming. Built using Flask, WebSockets, GPIO, and Picamera2 — no external controllers or apps needed!\n\u003cbr\u003e\u003cbr\u003e\n## Table of Contents\n- [About the project](#about-the-project)\n- [Dependencies](#dependencies)\n- [How it works?](#how-it-works)\n- [Enable as a Service](#enabling-script-as-a-service-to-start-at-boot)\n\u003cbr\u003e\u003cbr\u003e\n## About the project\nThis project runs on a Raspberry Pi Zero 2 W with Raspberry Pi OS 64-bit installed. Despite its small size and low power usage, this Pi packs enough performance to handle a basic video stream and control a 4WD robotic car. \n\u003cimg src=\"Assets/IoT Camera Bot.png\"\u003e\nTo ensure a smooth and steady video feed, I don't rely on the Pi's internal Wi-Fi. Instead, I use a TP-Link AC1300 USB Wi-Fi adapter, which supports 5GHz networks. This allows a faster and more stable connection between the Raspberry Pi and my home network.\n\n\u003cimg src=\"Assets/Adapter.avif\" width=500\u003e\n\nThe Raspberry Pi connects to my home Wi-Fi using the TP-Link adapter, not the built-in one. I initially used the desktop GUI to set it up, but later switched to CLI-only mode to improve performance by freeing up resources.\n\u003cbr\u003e\u003cbr\u003e\n## Dependencies\nHere are the packages required to run this script\n```\nsudo apt update \u0026\u0026 sudo apt install -y \\\npython3 \\\npython3-flask \\\npython3-picamera2 \\\nlibcamera-dev \\\npython3-pil \\\npython3-numpy \\\npython3-gpiozero \\\npython3-rpi.gpio\n```\nWith Raspberry Pi OS Bookworm or later, the \"enable camera\" option in `raspi-config` has been removed, so make sure you have a working camera that you can access via\n```\nrpicam-hello\n```\n## How it works?\nThe video feed isn’t technically a live stream. Here's what happens: the camera captures raw frames, which are not natively web-compatible. Each frame is converted to MJPEG format and served in sequence through a browser. So you're actually watching a rapid slideshow of JPEGs, not a continuous video.\n\n\u003cimg src=\"Assets/Stream.gif\" width=500\u003e\n\nThe bot uses a night vision camera, but any standard Pi-compatible cam should work. I'm using an L298N motor driver to drive a 4WD chassis. Motors on the left and right sides are paired for control simplicity. Power comes from a 2S 18650 battery pack, providing 8.4V. Due to voltage drop (~2V) across the BJT-based L298N, a higher input voltage helps maintain motor speed. If you're prioritizing efficiency, consider switching to a MOSFET-based H-bridge. The Pi itself draws power from a separate 5V power bank module to keep things stable.\n\n## Youtube Video (Bot in Action)\n[![Watch the video](https://img.youtube.com/vi/E3UKFRwnvDQ/maxresdefault.jpg)](https://www.youtube.com/watch?v=E3UKFRwnvDQ)\n\n\u003cbr\u003e\u003cbr\u003e\n## Enabling script as a service to start at boot\nTo make the project plug-and-play, I created a systemd service that automatically starts the main control script at boot. This way, the Pi is ready to go without needing SSH or manual intervention every time.\n\nCreate a service file\n```\nsudo nano /etc/systemd/system/remote.service\n```\nPaste this template and replace the path for your case\n```\n[Unit]\nDescription=Bot Script\nAfter=network.target\n\n[Service]\nWorkingDirectory=/path/to/your/clone\nExecStart=/usr/bin/python3 /path/to/your/clone/remote.py\nUser=root\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\nReload systemctl and enable the service\n```\nsudo systemctl daemon-reload \u0026\u0026 sudo systemctl enable remote.service\n```\nFinally, start the script\n```\nsudo systemctl start remote\n```\n\nThe script hosts web server on port 80 by default but if you want to change it, you can set that in line 78 in remote.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevanshtangri%2Fiot-camera-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevanshtangri%2Fiot-camera-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevanshtangri%2Fiot-camera-bot/lists"}