{"id":18577108,"url":"https://github.com/brianlesko/r2-dualsense2","last_synced_at":"2026-04-13T01:09:06.771Z","repository":{"id":210822633,"uuid":"727528661","full_name":"BrianLesko/R2-Dualsense2","owner":"BrianLesko","description":"implements the control of a double joint robot using Sony's Dualsense (PS5) controller.  (Pure python). Demonstrates external device communication, the strength of using classes while programming, and the power of simple user interfaces. By Brian Lesko for learning purposes.","archived":false,"fork":false,"pushed_at":"2024-01-17T23:16:56.000Z","size":7754,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T15:23:33.990Z","etag":null,"topics":["control","dualsense","forward-kinematics","low-code","modern-robotics","ps5","python","remote-control","robotics","streamlit","ui","under-100-lines"],"latest_commit_sha":null,"homepage":"","language":"Python","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/BrianLesko.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-12-05T03:28:38.000Z","updated_at":"2024-10-26T08:05:17.000Z","dependencies_parsed_at":"2024-01-18T01:06:09.225Z","dependency_job_id":"dcfaaee2-7a52-419c-bd4f-7403b55e33ac","html_url":"https://github.com/BrianLesko/R2-Dualsense2","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"2e9c48670f2b1f99bbf9c389c807cb04ea63c4e5"},"previous_names":["brianlesko/r2-dualsense2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLesko%2FR2-Dualsense2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLesko%2FR2-Dualsense2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLesko%2FR2-Dualsense2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLesko%2FR2-Dualsense2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianLesko","download_url":"https://codeload.github.com/BrianLesko/R2-Dualsense2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448614,"owners_count":22072765,"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":["control","dualsense","forward-kinematics","low-code","modern-robotics","ps5","python","remote-control","robotics","streamlit","ui","under-100-lines"],"created_at":"2024-11-06T23:27:51.533Z","updated_at":"2026-04-13T01:09:06.764Z","avatar_url":"https://github.com/BrianLesko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# R2-Dualsense2\nThis code implements the control of a double joint robot using Sony's Dualsense (PS5) controller. The robot is visualized using the Streamlit library and is perfectly responsive. This project is written in [Pure Python](https://github.com/BrianLesko/R2-Dualsense2/blob/main/app.py) in under 100 lines of code. Created by Brian Lesko for Learning Purposes.\n\n\u0026nbsp;\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"docs/preview.gif\" width=\"800\"\u003e\u003c/div\u003e\n\n\u0026nbsp;\n\n## Dependencies\n\nThis code uses the following libraries:\n- `streamlit`: for building the user interface.\n- `numpy`: for creating arrays.\n- `matplotlib`: for saving image data\n- `io`: for saving image data\n- `hidapi`: for accessing usb connections on the host device\n\n\n\u0026nbsp;\n\n## Usage\n\nRun the following commands:\n```\npip install --upgrade streamlit libusb hidapi matplotlib modern_robotics\nstreamlit run REPLACE\n```\n\nThis will start the local Streamlit server, and you can access the chatbot by opening a web browser and navigating to `http://localhost:8501`.\n\n\u0026nbsp;\n\n## How it Works\n\nThe app as follows:\n1. The hidapi library is used to initiate a connection to the PS5 controller\n2. The dualsense class is used to decode the received bytes\n3. The robot class is used to plot the robot figure\n4. Streamlit is used to display the robot\n\n\u0026nbsp;\n\n## Repository Structure\n```\nrepository/\n├── app.py # the code and UI integrated together live here\n├── customize_gui # class for adding gui elements\n├── dualsense.py # The class used to decode received bytes from the wired controller\n├── requirements.txt # the python packages needed to run locally\n├── .gitignore # includes the local virtual environment named my_env\n├── .streamlit/\n│   └── config.toml # theme info for the UI\n└── docs/\n    └── preview.png # preview photo for Github\n```\n\n\u0026nbsp;\n\n## Topics \n```\nPython | Streamlit | Git | Low Code UI\nExternal device | HIDapi | decode bytes | PS5 | Sony | Dualsense | communication | Remote control \ncustom classes\nSelf taught coding | Mechanical engineer | Robotics engineer\n```\n\u0026nbsp;\n\n\u003chr\u003e\n\n\u0026nbsp;\n\n\u003cdiv align=\"center\"\u003e\n\n\n\n╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮        ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮\n┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃        ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃\n┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃        ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃\n┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃        ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃\n┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃        ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃\n╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯        ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯\n  \n\n\n\u0026nbsp;\n\n\n\u003ca href=\"https://x.com/TheBrianLesko/status/1124018912268554240\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/BrianLesko/BrianLesko/main/.socials/svg-grey/x.svg\" width=\"30\" alt=\"X Logo\"\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003ca href=\"https://github.com/BrianLesko\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/BrianLesko/BrianLesko/main/.socials/svg-grey/github.svg\" width=\"30\" alt=\"GitHub\"\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003ca href=\"https://www.linkedin.com/in/brianlesko/\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/BrianLesko/BrianLesko/main/.socials/svg-grey/linkedin.svg\" width=\"30\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n\n\nfollow all of these or i will kick you\n\n\u003c/div\u003e\n\n\n\u0026nbsp;\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianlesko%2Fr2-dualsense2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianlesko%2Fr2-dualsense2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianlesko%2Fr2-dualsense2/lists"}