Now somehow Mouse.h, with begin() and move() does not work. it used to work. serial debug output is commented out because it interferes with mouse functionality using the ide and also the arduino device does not run on computers without the ide if mouse/serial is on at the same time. on two computers the mouse.h does not work, both win11.
I really think the usb device usage needs to be fixed, it blocks too much other functionality.
Let me suggest you to move this question to another (new) topic, because you are now covering a totally different issue than the one described on this topic subject.
I see, but it isn't the best way to both help you tracking the issues and replies, and us to understand what we're talking about.
When programming, always face one problem at the time, or at least be able to separate the main topics (sometimes they could even be connected each other, but this could come out only after a deeper analysis).
Btw, do what you think is better for you (but keep in mind you should help others to better understand what you're asking for and track each issue separately).
I like very wide parallel programming. at once. these are better tracked together. as usual problems to encounter.
cheers, mate.
all these are platform usability and functionality errors related in general btw. no need to split any of these. ie not separate issues but rather bug/feature type issues.
do not ask me to split anything. thanks. my management of the issue will be slowed down if many issues required.
can you tell why the mouse.h mouse emulation api interface is not working as it was before, no code changed?
also I look answers for myself firstly, not for others firstly.
Same board ?
Same type of board ?
Same connections ?
Same peripherals ?
Same power supply ?
Same PC ?
Same USB cable ?
Same physical USB port ?
Same COM port ?
Same computers, same arduino nano 33 iot. different win11 version. win11 reinstalled on both machines, dev and test machines. different dev computer. the mouse never worked on the dev computer, only in the other similar machine. nothing else changed. same/similar source code.
the old code used to work without changes.
the arduino will appear as HID usb device (mouse) like it should be, but the mouse does not move. even if the input is in the range of [-128,127]. converted down from float. and checked to be non-zero, around -100, 100 range.
the board normal other code works as intended, the led flashes as programmed. only the Mouse.move() does nothing. If there is Serial.println() then the other functionality of the code is not working.
In the future, please create a separate topic for each distinct subject matter. Tacking complete unrelated discussions onto a previous topic is inconsiderate because it means the forum helpers have to read through a lot of unrelated posts in order to get the understanding of the full context that is required to provide effective assistance.
Select View > Devices by type from the Device Manager menus.
Open the "View" menu.
If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
Under the "Ports (COM & LPT)" section of the device tree, you should see your Arduino board listed. Right click on it.
A context menu will open.
Select "Uninstall device" from the menu.
An "Uninstall device" dialog will open.
Check the box next to "☐ Attempt to remove the driver for this device" in the "Uninstall device" dialog.
Click the "Uninstall" button.
Wait for the uninstall process to finish, as indicated by the "Uninstall device" dialog closing.
Disconnect the USB cable of the Arduino board from your computer.
Connect the Arduino board to your computer with a USB cable.
Wait for a device to appear under the "Ports (COM & LPT)" section of the Device Manager device tree.
If you still see a overlay on the device icon, repeat the instructions above from step (3) until it appears without the icon overlay. ⓘ I find that sometimes it takes multiple attempts to completely remove the problematic drivers from my system (perhaps there are multiple copies of them present).
Keyboard and mouse emulation should now start working as expected.
The issue is in the current windows 11 version hid drivers, not in the code or in the arduino studio environment (older or current v2.3.4). I had a working version of the arduino mouse project (using an older arduino ide version) on the device but that did not work either on the current newer win11 install/version. It only worked on some previous win11 version around september 7 2023. This arduino install is a clean install, no previous installs on this pc. no previous usage of the arduino mouse device on the other pc either.
I cannot test currently on any other windows version like win10 or older win11.
that 1.8.0 onwards problem is not a correct report, I had the mouse working previously with a arduino ide 2.x.x some version, probably 2.3.1 or possibly 2.2.4.
If you have the mouse.h enabled, the first arduino device is for the programming in the arduino IDE and the second device is the mouse HID usb device. If the mouse.h is in production environment, then it should work plug-and-play, no device settings changes in the device manager required for the user.
The mouse emulation does not work in arduino ide pc or in a clear non-arduino ide pc. should work in both. If the mouse device does not work out of the box, not production ready. I require a production version, not a development version, for actual users. Consumer device cannot have any of the device manager driver issues.
yes there is the warning icon now before any manual modification or uninstall of drivers. on win11 device manager. now after the remove drivers uninstall the second com port for arduino device does not appear at all. btw, there is no HID device for the mouse, only an USB input device under the hid device category. On the other pc without the arduino ide, there is just the one com port, without the warning icon, but the mouse does not move.
Revert to whatever you had during september 7 2023, when the mouse.h actually worked. but thats possibly only a win11/os internal issue. windows (ms) might have changed how usb devices work after that. I also have a firmware version on the nano 33 iot board of that time period, not the current. I dont see what the current firmware version on the board is, if its the latest 2.0.0 or something else. even if getting board info. firmare seems to be version v2.0 on the nano 33 iot.
This was also my hypothesis, as I said in my previous reply.
This is exactly what the instructions are intended to achieve. The problem is that the Windows "usbser" driver is installed for the board's HID device, which breaks the HID functionality. By uninstalling the "usbser" driver, you allow the appropriate Windows built-in "HidUsb" driver to be used instead.
Did the mouse emulation start working as expected after that?
There has been a release of the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" platform (1.8.14) since that time. I'll provide instructions you can follow to roll back to the previous version (1.8.13):
Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
Scroll down through the list of boards platforms until you see the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" entry.
Select "1.8.13" from the drop-down menu in the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" entry.
Click the "INSTALL" button at the bottom of the entry.
Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
Successfully installed platform ...
Arduino IDE will occasionally notify you that a new version of the boards platform is available, assuming you want to continue to use the older version, you'll need to refrain from accepting the offer. If you find these notifications annoying, you can disable them via the advanced settings.
I'll provide instructions you can follow to do that:
Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
A menu will appear on the editor toolbar:
Select the "Preferences: Open Settings (UI)" command from the menu. ⓘ You can scroll down through the list of commands to find it or type the name in the field.
A "Settings" tab will open in the Arduino IDE main panel.
Type arduino.checkForUpdates in the "Search Settings" field of the "Settings" tab.
Uncheck the box under the "Arduino: Check For Updates" setting.
Close the Preferences tab by clicking its X icon.
If you disable the automatic update check, make sure to periodically do a manual check for newer versions of Arduino IDE and your installed boards platforms and libraries. You can check for new versions of Arduino IDE by selecting Help > Check for Arduino IDE Updates from the Arduino IDE menus. You can check for new versions of boards platforms and libraries by selecting "Updatable" from the "Type" menu in the Boards Manager and Library Manager views.
The relevant firmware is the one loaded on the Nano 33 IoT board's primary ATSAMD21G18 microcontroller. That is whatever sketch you uploaded to the board. So it doesn't make sense to talk about a "firmware version" in this context.
When we do talk about a "firmware version" in relation to the Nano 33 IoT board, we are referring to the firmware on the "NINA" radio module. That module doesn't have anything to do with the HID functionality of the board, so the firmware on that module is not relevant to the problem you are experiencing.
I did not update the on-board program after sept7 2023. I did not update the ide since sept7 2023, until now. before and after dont work now. nothing to do with the ide or firmware updates or similar. something in the win11 implementation of the hid driver is broken, relative even to the old before sept7 2023 arduino mouse.h implementation and any uploads done then.
stated otherwise, a working device stopped working. the only thing that could have changed is win11/drivers. I cant do anything even with the roll-back, because that does not work either, in current win11/drivers.
key fact is that the sept7 2023 software stack (mouse.h) and uploads done by that dont work either. I had a working device, now it does not work. I dont have to do anything and it will not benefit doing. its on the win11/drivers side. that might affect you having to change the code to work with the new working way there. as I dont think they will change anything if someone just asks.