/PMW3389_Mouse

Code for a 3D printed Arduino Pro Micro mouse utilizing the PMW3389 sensor.

Primary LanguageC++MIT LicenseMIT

PMW3360 Module Image

PMW3389 Mouse

This code is for a custom 3D printed mouse that utilizes the PMW3389 sensor. The video about this project can be found here: https://youtu.be/qmX8vL-GbxU

Code history:

Parts list

Electronics and PCB Schematics

  • Check the respective folders for the KiCad and Gerber files.

Sensor module pinout

  • MI = MISO
  • MO = MOSI
  • SS = Slave Select / Chip Select
  • SC = SPI Clock
  • MT = Motion (active low interrupt line)
  • RS = Reset
  • GD = Ground
  • VI = Voltage in up to +5.5V (will work with 3.3v)

Sketch Descriptions

  • PMW3389DM-Mouse/
    • Mouse with high polling rate and 4 main buttons: Left, Right, Middle, Back, plus 2 user-definable Keyboard buttons
    • Default CPI and debounce time can be set (see #define sections in the source code)
    • Cycle through CPI with button combo (back + right click), LED will update to show which mode is selected

3D Models

  • Check the 3D_models folder

How to use

  • Build the circuit as described.
  • (Arduino only) Copy the /library/AdvMouse/ to your Arduino library folder
  • Load PMW3389DM-Mouse on Arduino IDE.
    • Change dx, dy to positive values if input is reversed
  • Upload code to Arduino
  • Enjoy!