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

Something must have change in CircuitPython #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dglaude
Copy link

@dglaude dglaude commented May 22, 2020

Your code was not working for me on CircuitPython 5.3+ (maybe before).

Need to import usb_hid to later use that to create the keyboard object.
Then, I could not find send_code function anymore, so I did this in two step, set the code, then send.

This is working for me, but I don't know exactly what I am doing.
I would advise to test yourself before accepting this PR.

Regards.

dglaude added 2 commits May 22, 2020 02:06
Your code was not working for me on CircuitPython 5.3+ (maybe before).

Need to import usb_hid to later use that to create the keyboard object.
Then, I could not find send_code function anymore, so I did this in two step, set the code, then send.

This is working for me, but I don't know exactly what I am doing.
I would advise to test yourself before accepting this PR.

Regards.
There was another usage of keyboard.hid_keyboard.send_report that needed to be fixed.
@dglaude
Copy link
Author

dglaude commented May 23, 2020

There is another change that might reduce the verbosity of this code.
I replaced else: by elif len(data)>0:.
I believe that data = uart.read(11) return with data or without data after a timeout.

@urfdvw
Copy link

urfdvw commented May 24, 2022

Tested this code in CPy 7.2. Worked. Please consider merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants