Hi everyone, I have an Arduino Leonardo board , and i wanna try to simulate my mouse mouvement only using the AbsMouse library only (absolute coordinates)
This is my sketch, (its an USBHIDBootMouse.ino example based)
#include <hidboot.h>
#include <usbhub.h>
#include <AbsMouse.h>
// Satisfy the IDE, which needs to see the include statment in the ino too.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
#include <SPI.h>
class MouseRptParser : public MouseReportParser
{
protected:
void OnMouseMove (MOUSEINFO *mi);
void OnLeftButtonUp (MOUSEINFO *mi);
void OnLeftButtonDown (MOUSEINFO *mi);
void OnRightButtonUp (MOUSEINFO *mi);
void OnRightButtonDown (MOUSEINFO *mi);
};
void MouseRptParser::OnMouseMove(MOUSEINFO *mi)
{
Serial.print("dx=");
Serial.print(mi->dX, DEC);
Serial.print(" dy=");
Serial.println(mi->dY, DEC);
AbsMouse.move(mi->dX, mi->dY);//<<<<<using absolute coordinates ? //
};
...
its dosn't work wery well when trying to move my mouse, (it work fine with Mouse.move(X;Y) )
How can i make it work using absolute coordinates of mouse ? not using relative ones like (Mouse.move) does