Giter VIP home page Giter VIP logo

Comments (5)

benjaminaigner avatar benjaminaigner commented on May 28, 2024

Dear Sandric,

asking is never a crime :-).
A small clarification:

This project is used to trigger mouse and keyboard actions on a paired device. These mouse/keyboard actions are input to the ESP32 via the second serial interface (not the programming/debugging interface, which you used via 'make flash' or 'make monitor').

Just for basic testing, we also implemented following characters, which can be typed in via the 'make monitor' console (which is UART0 of the ESP32):

  • 'w'/'a'/'s'/'d': move the mouse cursor
  • 'l' click left
  • 'r' click right
  • 'q' type in keycode for "Y"

Note: these are just for testing, if you want to try full functionality, you have to attach something to UART1, using pins 16/17 (see config.h line 14/15). UART config is done in https://github.com/asterics/esp32_mouse_keyboard/blob/master/main/ble_hidd_demo_main.cpp#L599
and set to: 8N1 @ 9600baud

from esp32_mouse_keyboard.

benjaminaigner avatar benjaminaigner commented on May 28, 2024

Regarding an example:

This project sends mouse/keyboard action immediately after you put a struct into following queues (FreeRTOS related stuff, if this is new, please read their docs before proceeding):

  • mouse_q for mouse actions
  • keyboard_q for mouse actions

from esp32_mouse_keyboard.

benjaminaigner avatar benjaminaigner commented on May 28, 2024

For your example use case:

uint8_t output[] = "quick brown fox";
uint8_t i = 0;
while(output[i])
{
    sendKey(output[i], PRESS_RELEASE);
    //second option:
    //sendKey(output[i], PRESS); //send a key press event (hold it until release is sent)
    //sendKey(output[i], RELEASE); //release the key
    i++;
}

from esp32_mouse_keyboard.

sandric avatar sandric commented on May 28, 2024

wow, thanks a lot, I reread main readme and realized second UART example, thanks a lot for your last example also, trying new things can be challenging at times but interesting.

from esp32_mouse_keyboard.

benjaminaigner avatar benjaminaigner commented on May 28, 2024

Don't worry, glad to help ;-)
I had my troubles too getting started with BLE/HOG/GAP/GATT/.......

from esp32_mouse_keyboard.

Related Issues (20)

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.