ATmega328P CH340G UNO R3 as mouse

Will it possible to use ATmega328P CH340G UNO R3 as a mouse? I have a seen a project which makes Atmega16U2 chip into a mouse. Can this be adapted for 328p or is there any other way?

I believe that the short answer is no

Which Arduino board or boards do you have ?

I agree with @UKHeliBob here. The CH340G chip will enumerate over the USB interface as a serial port type device, and as such it won't look to the PC as a mouse.

Having said that, several decades ago, I think we did have mice that used the serial port. It was around the time of the PS-2 mouse or maybe before that. I think the interface used the handshake lines to convey pulses relating to the movement of the mouse, rather than using the actual UART data lines.

Have a search for something like "PC serial mouse". I'm not sure if the latest OS (Linux, Win, Mac) retains support for devices like this.

I very much doubt that. A serial mouse used the serial data. It used the handshake lines to actually power the mouse! (And it was of course a "male" mouse, not an optical - ":female_sign:" - one. :grin:)

Indeed, on an actual UNO, the 16U2 can be configured as a HID; a keyboard, mouse or gamepad etc.

But a board with a CH340 instead is simply not a "UNO" no matter how it is advertised. It is a modification of the earlier Duemilanove design which did not have the 16U2 which makes a UNO.

So no, it cannot emulate a mouse. :roll_eyes:

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