I have a project in Embedded Systems subject in mu univ. where I'm tasked to make a HID mouse using 'Arduino Leonardo' without 'Mouse.he'.
I tried address the problem programmatically using the SetCursorPos(x,y) function from windows.h for windows.
And something like this in linux:
// Construct the xdotool command to move the mouse cursor
char command[100];
sprintf(command, "xdotool mousemove %d %d", x, y);
// Execute the xdotool command
system(command);
But I don't think the arduino have the ability to execute commands in the terminal. so I've used up all my ideas and now I'm stuck in a dead end.
Thank you all for your time
(P.S. : I'm more of a developer than an electrical engineer, that why i tried using programming, I don't have solid bases in embedded systems)
I'm sorry for the late reply,
That the solution I'm using currently, I'm using pyautogui to move the mouse after reading the x and y values sent by the arduino board.
But it's not the solution he wanted, I need to code it using raw C language using avr as if I'm coding a the Atmega32u4 itself
Yeah I just realized that , If i only have enough time, enough free time or enough background in coding raw C using avr that might have been much easier.
Yeah I just found out that i can use something like avrdude or winavr to upload my code to the arduino board.
and after using avrdude to upload my code (.hex file) to board, its port stops being recognized
Well... this is the first time, in my four years of learning software development, that I need to read a microcontroller datasheet and figure out how to manipulate ports, UART, and stuff. . I guess my country's educational system is failing