AbsoluteMouse doesnt get compiled

Hello, im using the AbsoluteMouse library (the github page) to control my mouse using an joystick,
but i always get the Error:

"In file included from C:*path from my computer here*\Arduino\libraries\AbsoluteMouse\src/vusb/usbdrv.h:11:0,
                 from C:\Users\*path from my computer here*\Arduino\libraries\AbsoluteMouse\src/vusb/usbFunctionSetup.h:3,
                 from C:\Users\*path from my computer here*\Arduino\libraries\AbsoluteMouse\src/absolute-mouse.h:6,
                 from C:\Users\*my user*\AppData\Local\Temp\.arduinoIDE-unsaved202441-19840-1d4npe3.534k\sketch_may1a\sketch_may1a.ino:3:
C:\Users\pirmi\OneDrive\Dokumente\Arduino\libraries\AbsoluteMouse\src/vusb/usbportability.h:121:10: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>
          ^~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1"

and i have no idea on how to fix it. i installed it using the library installer in the IDE.
Im using the uno r4 Minima.
Id be happy if anyone could help me : )

Which Arduino board are you using ?

Oh sorry i completly forgot, im using the uno r4 minima, ill put it in the title now

Note the name of the library file that the sketch cannot find

avr/io.h: No such file or directory

Your board does not have an AVR processor, hence the problem. The library does not support your board

1 Like

I got an R3 too, do you think that would work?
i used the R4 bc it has built in HID, but Mouse.h isnt absolute, so i thought use AbsoluteMouse. But that apperently doesnt work : (

The Uno R3 has an AVR processor so that file should be available. However, I am fairly sure that you cannot use the R3 as a HID device because it does not have the required USB interface.

Try it and see

Hi @pling. I had need for absolute mouse positioning for a project some years ago. I ended up using this library:

The library uses a very crude approach to achieve absolute positioning, but it only relies on the standard behavior of the Arduino "Mouse" library so this means it can be used with any board that has compatibility with that library.

I have encountered some strange behavior when using the "Mouse" library with the UNO R4 Minima so it seems that maybe the library compatibility with that board is not 100% perfect, but it does generally work.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.