Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brianlesko/dualsensecanvas

Use the touchpad on a Sony Dualsense (ps5) controller to sketch an image on a web based app. Written in pure Python. Or use the base class to receive controller inputs from a wired controller. Made by an engineering professional working as a robotics engineer. Devceloped on an apple computer Mac for learning purposes
https://github.com/brianlesko/dualsensecanvas

Last synced: about 20 hours ago
JSON representation

Use the touchpad on a Sony Dualsense (ps5) controller to sketch an image on a web based app. Written in pure Python. Or use the base class to receive controller inputs from a wired controller. Made by an engineering professional working as a robotics engineer. Devceloped on an apple computer Mac for learning purposes

Awesome Lists containing this project

README

        

# Dualsense Sketchpad
This code implements a sketchpad app using a wired Dualsense (PS5) controller. The code is rritten in [Pure Python]() - created for Learning Purposes.

 

 

## Dependencies

This code uses the following libraries:
- `streamlit`: for building the user interface.
- `numpy`: for creating arrays.
- `matplotlib`: for saving image data
- `io`: for saving image data
- `hidapi`: for accessing usb connections on the host device

 

## Usage

Run the following commands:
```
pip install --upgrade streamlit hidapi matplotlib streamlit
streamlit run https://raw.githubusercontent.com/BrianLesko/DualSenseCanvas/main/app.py
```

This will start the local Streamlit server, and you can access the chatbot by opening a web browser and navigating to `http://localhost:8501`.

 

## How it Works

The app as follows:
1. The hidapi library is used to initiate a connection to the PS5 controller
2. The dualsense class is used to decode the received bytes
3. Streamlit is used to display the decoded bytes from the touchpad
4. The app stops after a set number of loops
5. The user can download their artwork

 

## Repository Structure
```
repository/
├── app.py # the code and UI integrated together live here
├── customize_gui # class for adding gui elements
├── dualsense.py # The class used to decode received bytes from the wired controller
├── requirements.txt # the python packages needed to run locally
├── .gitignore # includes the local virtual environment named my_env
├── .streamlit/
│ └── config.toml # theme info for the UI
└── docs/
└── preview.png # preview photo for Github
```

 

## Topics
```
Python | Streamlit | Git | Low Code UI
Sketchpad | HIDapi | decode bytes | PS5 | Sony | Dualsense | external device | communication
custom classes
Self taught coding | Mechanical engineer | Robotics engineer
```
 


 

╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮
┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃
┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃
┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃
┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃
╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯

 

X Logo             GitHub             LinkedIn

follow all of these or i will kick you