GithubHelp home page GithubHelp logo

ardumouse's Introduction

Arduinomouse

Easy to use Arduino library for connecting PS/2 or PS/2 compatible USB mice to AVR based Arduino boards.

Connecting the Mouse

Connect the mouse to the Arduino as shown in the pictures below. With the 10k resistor between Vcc and Data, it is possible to upload the sketch with the mouse connected.

Connection of mouse with PS/2 connector

Connection of mouse with USB connector

Usage

Copy ps2mouse.cpp and ps2mouse.h to your project directory. Include ps2mouse.h. The script must call mouse_init() in its setup() function and mouse_update() in the loop() function. The on_mouse() callback is called when the mouse has moved or a button was pressed. There are also two optional callback functions on_mouse_ready() and on_mouse_disconnected() that are called when the mouse is plugged in and ready to use or plugged out.

Example Sketch

Try the Example circuit and Arduino sketch.

Example on breadboard

Circuit diagram of Example

ardumouse's People

Contributors

michalin avatar

Stargazers

André Jr. avatar Maged E. William avatar now_its_dark avatar

Watchers

 avatar  avatar

Forkers

shike69 andreljr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.