Git Product home page Git Product logo

esp32-ble-abs-mouse's Introduction

ESP32 BLE Abs Mouse library

This library allows you to make the ESP32 act as a Bluetooth Absolute Mouse and control what it does. E.g. click, move, release and etc.

You might also be interested in:

Features

  • Click
  • Move
  • Release
  • Report optional battery level to host (basically works, but it doesn't show up in Android's status bar)
  • Customize Bluetooth device name/manufacturer
  • Compatible with Android
  • Compatible with Windows
  • Compatible with Linux
  • Compatible with MacOS X
  • Compatible with iOS

Installation

Examples

#include <BleAbsMouse.h>

BleAbsMouse bleAbsMouse;

void setup() {
  bleAbsMouse.begin();
}

void loop() {
  if(bleAbsMouse.isConnected()) {
    bleAbsMouse.click(5000, 5000);
  }
  delay(2000);
}

Check examples for concrete examples.

API docs

// Use 0 up to 10000 to represent:
//   x: from left to right
//   y: from top to bottom
bleAbsMouse.click(x,y);

// If you want to click and stay clicked, use move instead:
bleAbsMouse.move(x,y);

// Since move keeps the finger as pressed, you need to release it when convenient
bleAbsMouse.release();

There is also Bluetooth specific information that you can use (optional):

Instead of BleAbsMouse bleAbsMouse; you can do BleAbsMouse bleAbsMouse("Bluetooth Device Name", "Bluetooth Device Manufacturer", 100);.

The third parameter is the initial battery level of your device. To adjust the battery level later on you can simply call e.g. bleAbsMouse.setBatteryLevel(50) (set battery level to 50%). By default the battery level will be set to 100%, the device name will be ESP32 Bluetooth Abs Mouse and the manufacturer will be Espressif.

Credits

Credits to T-vK as this library is based on ESP32-Ble-Mouse that he created.

esp32-ble-abs-mouse's People

Contributors

t-vk avatar sobrinho avatar dvv avatar grafmar avatar ricalvrod avatar

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.