Hi all,
I'm trying to make an arduino absolute positioning mouse but something is wrong with my code. When I upload this code it doesn't do anything. I'm using arduino leonardo micro and MouseTo.h library.
I found an examle but I can't understand MouseTo.setTarget(x,y) function. If I remove the second while then it doesn't works. If I use thiw code then cursor goes to (400,100) on screen then after 1 second it returns on (0.0) and then again on (400,100)
thanks for your help
Move mouse pointer to absolute screen coordinates. Note that screen coordinates start from the upper left corner.
Parameter: targetX - X screen coordinate to move to.
Type: int
Parameter: targetY - Y screen coordinate to move to.
Type: int
Parameter(optional): homeFirst - Whether to home the mouse pointer before moving to the target. At a minimum the pointer must be homed before the first use of MouseTo in your code. If homing is not done after that time the accuracy of the mouse pointer movements might suffer, for example if the regular mouse connected to the computer is moved. The default value is true.
Type: boolean
Returns: none