Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wireless hid recipes & some minor improvements #23

Merged
merged 7 commits into from
Jan 7, 2021
Merged

Wireless hid recipes & some minor improvements #23

merged 7 commits into from
Jan 7, 2021

Conversation

2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Jan 7, 2021

I threw together a couple recipes. These recipes aim to mimic the logitech unifying peripherals.

  1. wireless_hid_hub.py: A simplistic program to receive HID report data buffers and forward them to the USB connection.
    • Currently implemented is
      • mouse
      • keyboard
      • gamepad
      • consumer HID (multimedia keypads)
    • Each HID profile is dedicated to pipes 1-4. Pipe 0 is used for pairing (which is only open for 60 seconds upon program start). Pipe 5 is closed, but it mainly reserved for a future feature like a MIDI input/output controller. This recipe will not work on the raspberry pi because the adafruit_blinka library does not provide the usb_hid module that is included with practically all circuitpython firmware.
  2. wireless_hid_mouse.py: Simply pairs with the wireless_hid_hub and sends out a HID report buffer that resembles a USB mouse. Unlike other circuitpython libraries, this recipe supports the scroll wheel, middle (scroll wheel) button, and the special mouse buttons "forward" & "backward".

Other minor fixes

  • close_rx_pipe() now properly prevents the listen attribute from overriding the pipe 0 reading address
  • print_details() now prints a more accurate representation of the addresses used on the pipes. Like the TMRh20 RF24 library's printDetails(), the address now prints a "hexlified" string in big endian form.
  • NEW address_repr() helper function (belonging to the rf24.py module nut not the RF24 class) is the helper function that returns the address specified as a "hexlified" string in big endian form.

@2bndy5 2bndy5 added the enhancement New feature or request label Jan 7, 2021
@2bndy5 2bndy5 merged commit e18230f into dev Jan 7, 2021
@2bndy5 2bndy5 deleted the wireless-hid branch January 7, 2021 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant