Processing Forum
class arduMouse { Robot myRobot; // create object from Robot class; static final short rate = 4; // pixels to move int centerX, centerY; arduMouse() { try { myRobot = new Robot(); } catch (AWTException e) { e.printStackTrace(); } Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); centerY = (int)screen.getHeight() / 2 ; centerX = (int)screen.getWidth() / 2; }
Ideas? Thanks!