{"id":16879052,"url":"https://github.com/robertlucian/remotecontrolpi","last_synced_at":"2025-06-25T02:37:14.558Z","repository":{"id":129587005,"uuid":"101453313","full_name":"RobertLucian/RemoteControlPi","owner":"RobertLucian","description":"Live streaming with joystick on the RaspberryPi with Pi Camera","archived":false,"fork":false,"pushed_at":"2018-06-19T20:37:32.000Z","size":305,"stargazers_count":4,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T12:12:14.186Z","etag":null,"topics":["gopigo","gopigo3","joystick","joystick-control","picamera","python","raspberry-pi","remote-control","robot"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/RobertLucian.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":"2017-08-26T01:09:01.000Z","updated_at":"2022-12-03T19:04:54.000Z","dependencies_parsed_at":"2023-06-12T11:30:27.029Z","dependency_job_id":null,"html_url":"https://github.com/RobertLucian/RemoteControlPi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RobertLucian/RemoteControlPi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLucian%2FRemoteControlPi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLucian%2FRemoteControlPi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLucian%2FRemoteControlPi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLucian%2FRemoteControlPi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobertLucian","download_url":"https://codeload.github.com/RobertLucian/RemoteControlPi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertLucian%2FRemoteControlPi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261792183,"owners_count":23210270,"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":["gopigo","gopigo3","joystick","joystick-control","picamera","python","raspberry-pi","remote-control","robot"],"created_at":"2024-10-13T15:52:36.283Z","updated_at":"2025-06-25T02:37:14.031Z","avatar_url":"https://github.com/RobertLucian.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remote Controlled Pi\n\nWith this library you can video stream from your `Raspberry Pi` with a `Pi Camera`.\nThe added feature is a on-screen joystick that works on touch-enabled devices and on regular computers.\nThe measured movement of the joystick is then relayed back to your `Raspberry Pi`, where you can then do anything with it - for instance, **driving a robot**.\n\nHere's an example project done with a `GoPiGo3` robot.\n![Example project done with GoPiGo3](http://i.imgur.com/SLUQGgS.gif)\n\n## How to use it\n\nIn order to process the joystick's movement, you have to take a look at `robot_commands` function that resides in `flask_server.py` script.\nIn this function, you get new updates of the joystick every 250 ms.\nIn this function, there are a couple of variables that were already assigned queried values. Here's what it means for each of it:\n\n* `state`: It's set to `move` when the joystick is moved away from the center and `stop`, when the joystick is released (and destroyed).\n* `angle_degrees`: The orientation of the joystick's small circle relative to the big circle. It's anti-clockwise and it starts at 0 degrees at the right (where the joystick is pulled to the right). It's measured in degrees and the values go from 0 up to 360.\n* `angle_dir`: It tells the general orientation of the joystick. It can be `up`/`down`/`left`/`right`.\n* `joystick_pull_force`: It tells how much the user is pulling the joystick from its center. The values start at 0 and don't have an upper limit. The upper limit is determined by the screen size.\n* `determined_speed`: Is computed from `joystick_pull_force`. The advantage is that this speed is relative to a given range (a max and a min constant).\n\nSince I've added a GIF showcasing the GoPiGo3 I also added code for the GoPiGo3 inside the server, so if you want to test it on your robot, just uncomment anything related to the GoPiGo3 (imports, function calls, exceptions and such) and add yours instead.\n\n## Setting Up\n\nInstall the `Pi Camera` dependencies and `Flask` by running the `install.sh` script:\n ```\n sudo pip3 install -r requirements.txt\n ```\n\nIf you want to run the script just as it is, you also need to install the `gopigo3` library from [GoPiGo3 Repo](http://github.com/DexterInd/GoPiGo3). Otherwise replace everything on the GoPiGo3 in the script with the function calls needed for your own robot.\n\nIf you have followed the above instructions, then by now, you should now have everything set up.\n\n\n\n## Running it\n\nStart the server by typing the following command:\n```\npython3 remote_robot.py\n```\nIt's going to take a couple of seconds for the server to fire up.\nA port and address will be shown in there. By default, the port is set to `5000`.\nTake your `Raspberry Pi` interface's IP address and port and use it on a mobile device or laptop in order to reach the web page.\nThe webpage's address will have the following pattern:\n```\nhttp://[raspberrypi-ip-address]:[port]\n```\n\nAlso, make sure you have your mobile device / laptop on the same network as your `Raspberry Pi`. Otherwise, you won't be able to access it.\n\n## Example Project\n\nThis is a project done with this library and with a `GoPiGo3`. Check it out on YouTube.\n\n[![Alt text](https://img.youtube.com/vi/Tu_-Al6Smhg/0.jpg)](https://www.youtube.com/watch?v=Tu_-Al6Smhg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertlucian%2Fremotecontrolpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertlucian%2Fremotecontrolpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertlucian%2Fremotecontrolpi/lists"}