Hi all I am new here so apologies if I have submitted this in the wrong section.
I have picked up an Arduino MKR WiFi 1010 with the intention of creating a Bluetooth macro keyboard for a university project I am working on.
I have grabbed some code from the tutorial in this video My Take on a DiY Macro Hotkey Keyboard - YouTube, notably using the Keyboard library. The code compiles and uploads without any issues, however when I press either of the two connected buttons I hear the windows device disconnected sound, before a couple of seconds later hearing it again. I can see in this time that the Arduino is disconnected in device manager.
Also in device manager I can see that there is a little triangle/exclamation point warning sign next to the Arduino and that it is connected on COM6, but in my code there is only the option to connect to COM5 (which in device manager also appears to be the Arduino as this vanishes when disconnected).
I am a bit of an Arduino newby so my apologies if I have missed something incredibly basic or not provided enough information.
From what I can find online the Arduino keyboard library is compatible with all architectures and should work on all Arduino boards. I have created an incredibly simple circuit consisting of a button in between two wires from port 6 and ground. This circuit works to write to the serial monitor and does not produce the warning sign in device manager, but as soon as I try and implement the keyboard library the warning reappears
missdrew:
From what I can find online, the Arduino Keyboard library is only compatable with Arduino's with native (HID) USB ports!
We must be looking at different Arduino websites.
Keyboard - Arduino Reference This is the website I am looking at where it says it should be compatible with all Arduino boards. If you are correct, does that mean that what I am trying to do is simply impossible on the board I have purchased?
It's not compatible with all Arduino boards; it will e.g. not work with an Uno. But the MKR is based on the SAMD and should work according to the documentation.
Not sure if it is possible to mark this as solved, but I have fixed the problem.
The solution that worked for me was to go into device managed with the Arduino unplugged, in view show hidden devices, navigate to the ports category. Delete all devices within ensuring to tick the option to remove drivers. After doing this the device works with the keyboard library and does not produce any warning signs inside device manger.
andy2626andy:
Not sure if it is possible to mark this as solved, but I have fixed the problem.
The solution that worked for me was to go into device managed with the Arduino unplugged, in view show hidden devices, navigate to the ports category. Delete all devices within ensuring to tick the option to remove drivers. After doing this the device works with the keyboard library and does not produce any warning signs inside device manger.
I can confirm this worked for me also, spent ages trying to figure out why the example program 09.USB > Keyboard > Keyboard Messages didn't work with Arduino MKR WiFi 1010 plugged into Windows 10, but worked on osx big sur.
Uninstall all entries listed under Ports (COM & LPT) fixed it.