Joystick Mouse
Create your own mouse!

Beginner circuitpython project to understand the basics of programming and create human interface devices.
In this project you will:
- Gain an introduction to microcontroller development
- Understand hardware and analog vs digital signals
- Learn the programming behind how a mouse works
- Develop in any way you see fit!
Hardware
Images
- CAD model
Wiring Diagram

Code
- libraries are imported for interfacing with other programs.
- A library is simply more code. It is a way to hide code inside other code and allows common functions to be re-used
- Pins and hardware are initialized
- A button (Switch) is set up to listen for when the user presses the joystick
- 2x analog input pins are set up to read a value. Rather than 0 or 1 for on off, this can read values in between. Like .2 or .7!
- Loop
- This is a fundamental concept in programming. It simply means when the logic is finished, it starts again. Creating a full circle, or loop.
- Reads button. If the button is pressed, it sends a mouse click event, otherwise it is released.
-
Reads analog values. If the values are negative or positive, it will move the mouse that many pixels
-
github