I'm trying to create a single encoder (X axis) ps/2 mouse using a nano and an optical encoder (not to be used as a traditional mouse, I can explain if needed).
I've searched high and low and can only find examples of HID versions.
Basically, I just need to take the input from an optical encoder and send out serial mouse movement messages to a ps/2 port.
I found this which is helpful:
but not sure how to get that working with an optical encoder to send mouse postition.
Any advice, use of ps/2 library w/ an encoder, code or links would be helpful. thank you
I will eventually use the RN-42 bluetooth HID module so the code I linked will be fine as far as "mousesend" data goes. I don't need any additional ps/2 initialization code unless you happen to know of any
CorneliusBrowns:
I'm trying to create a single encoder (X axis) ps/2 mouse using a nano and an optical encoder (not to be used as a traditional mouse, I can explain if needed).
I've searched high and low and can only find examples of HID versions.
Basically, I just need to take the input from an optical encoder and send out serial mouse movement messages to a ps/2 port.
I found this which is helpful:
SimpleMouseBT_RN42/SimpleMouseBT_RN42/SimpleMouseBT_RN42.ino at master · Marchanjo/SimpleMouseBT_RN42 · GitHub
but not sure how to get that working with an optical encoder to send mouse postition.
Any advice, use of ps/2 library w/ an encoder, code or links would be helpful. thank you
ps2 is the same a i2c and so you should be able to become a mouse by responding in the same way the mouse does
here is a video of an arduino connecting to a ps2 mouse. (with code)
Z