Skip to content

evan-kolberg/AdaptAbility-Mouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Control your computer cursor with a joystick!

What do I need?

Physical Things ~ Simple Version ↓

  • Arduino UNO
  • Joystick
  • 5 male to female wires
  • a USB AB cable (printer cable)

Physical Things ~ Main Version ↓

  • Arduino UNO
  • Joystick
  • 2 buttons
  • I2C LCD Display
  • Rotary encoder
  • RGB LED
  • Breadboard
  • 2 10k Ξ© resistors
  • 3 220 Ξ© resistors
  • a LOT of male to male cables
  • a LOT of male to female cables
  • a USB AB cable (printer cable)

Software ↓

  • Arduino IDE
  • VS Code (optional, but highly recommended)
  • Python 3.8+ (MAKE SURE YOU SELECT ADD TO PATH)

How do I do this?

  1. Choose a path: Main Version (cool) or Simple Verion (not cool) and downolad this repo
  2. If you choose the Main Version, go ahead and look at the .ino file to see how to assemble the hardware with the correct pin formation.
  3. Edit the COM port number in the python file that matches the COM port that your Arduino runs on (check using the Arduino IDE)
  4. Create a virtual environment in Python ~ Explained for VS Code below
  5. Install the dependencies with pip install pyserial pyautogui in a terminal window (preferably in the virtual env)
  6. Upload the .ino file to the Arduino
  7. Run the python file

173990813-af626dca-5e85-4971-926e-b44828880996

Main Version ~ Not Made with Fritzing


Basic

Simple Version ~ Made with Fritzing


How to Create a Virtual Environment for Python in VS Code

Always start with a project folder (download this repo to use as one)

Start by clicking 'New Terminal' under the 'Terminal' section on the top left part of VS Code.

Windows ↓

  • CMD --> python -m venv venv
  • Powershell --> py -m venv venv

Note: If you're using powershell, know that Microsoft makes you use py to reference the default installation of python. Otherwise, you will get a pop-up to the Windows Store, begging you to download their unstable version. Obviously, don't do what they're asking you to and stick with your installation.

  • Do CRTL + SHFT + P β†’ Type in 'Python: Select Interpreter' and hit enter. From there, click on the option with a star next to it. If there isn't a star next to any of them, look for .venv\Scripts\python.exe in your project folder. If there isn't a venv folder, then troubleshoot on the internet.
  • Do CTRL + SHFT + ` β†’ This should run the 'activate' file in the folder of the selected interpreter and pop-up with a terminal that says (venv) We know that the venv is working because it says '(venv)' before the project folder. From here, you can install libraries using pip without touching your main installation of python.

macOS ↓

  • ZSH --> python3 -m venv venv
  • Do CMND + SHFT + P β†’ Type in 'Python: Select Interpreter' and hit enter. From there, click on the option with a star next to it. If there isn't a star next to any of them, look for .venv\Scripts\python.exe in your project folder. If there isn't a venv folder, then troubleshoot on the internet.
  • Do CTRL + SHFT + ` β†’ This should run the 'activate' file in the folder of the selected interpreter and pop-up with a terminal that says (venv) We know that the venv is working because it says '(venv)' before the project folder. From here, you can install libraries using pip without touching your main installation of python.

About

πŸ•ΉοΈπŸ–₯️🐁

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published