Pc mouse controlled by arduino uno

Hello, is there any way to control mouse pc, via arduino uno and encoder or potentiometer, I tried it with a Mouse.h library but it is not being compiled for arduino uno, I tried a software called UnoJoyWin but I could not because my arduino does not have '16u2', is there any other option in order to control the mouse, can it be controlled only in X axis

That is not possible. Do you have a clone with a CH340G usb-serial chip ? If you look at the text on the chip near the USB connector, then you can read "CH340G".
Using the ATmega16U2 on the official Arduino Uno is not standard.

You need an Arduino Leonardo / Micro / Pro Micro, or a SAMD processor. It is in the reference: Mouse - Arduino Reference.
There are Pro Micro clones that are cheap.

There are often many solutions for a problem. You could send serial messages and have a script running on the computer that translates it into mouse movements. Or grab an old mouse with a ball inside and generate the rotation signals. However these are not practical solutions when there is already a good solution. A Arduino Leonardo is made for this.

As @Koepel says, No. A mouse is controlled by humans, mostly a hand.
Slow down and calmly tell facts, not sending an air SOS.

Re "UnoJoyWin". Edit that code and cut out/modify the output.

atmegaunooo:
I tried it with a Mouse.h library but it is not being compiled for arduino uno, I tried a software called UnoJoyWin but I could not because my arduino does not have '16u2',

If it does not have a 16U2, then it is simply not a UNO at all.

Many or most clones sold as UNOs are actually versions of the earlier Duemilanove. A genuine UNO is specifically defined by using a 16U2 (or the earlier 8U2), so if it lacks that, it is simply a complete fake. Mostly useful, but mendaciously advertised.

Paul__B:
Many or most clones sold as UNOs are actually versions of the earlier Duemilanove.

I’ve never seen a board advertised as “Uno” that used an FTDI FT232R.

That's why I said "versions". :grinning:

It remains, no 16U2, clearly not a UNO.

To be a UNO, it would have to have the functionality of a UNO. Part of that functionality is the 16U2 which can be programmed as a HID. If it cannot be so programmed, then it has only the functionality of the Duemilanove or a clone thereof. That Duemilanove functionality does not differ in any meaningful way whether using a FT232R, CH340, CP2102 etc.

the 100000 beginners who had to hunt down that CH340 driver on a sketchy looking website would beg to differ.

Not smart enough to use Linux, eh? :roll_eyes:

I’d think you’ve been around here long enough to notice that the great majority of Arduino beginners use Windows. I prefer to help everyone, regardless of operating system choice, rather than insulting them.

Merely pointing out basic facts. Linux just works with the various USB interface chips, partly because it implements USB classes and does not require fussy drivers for every individual chip variant.

It is just a pity that no-one updates the repository for the Software Manager with the recent Arduino IDE versions. :roll_eyes: Nevertheless the installation instructions on the Arduino site work well.

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