Reference.GetYChange History

Hide minor edits - Show changes to output

October 20, 2012, at 05:12 PM by Scott Fitzgerald -
Changed lines 7-8 from:
Reports the relative amount of movement of a mouse on the Y-axis since the last time polled. A positive number indicates movement to the right, a negative number indicates movement towards the left.
to:
Reports the relative amount of movement of a mouse on the Y-axis since the last time polled. A positive number indicates downward movement, a negative number indicates upward movement.
October 16, 2012, at 08:46 PM by Scott Fitzgerald -
Added lines 1-51:
[[USBHost]] : ''MouseController'' class

!!getYChange()

!!!!Description

Reports the relative amount of movement of a mouse on the Y-axis since the last time polled. A positive number indicates movement to the right, a negative number indicates movement towards the left.

!!!!Syntax

''mouse''.getYChange()

!!!!Parameters

none

!!!!Returns

int

!!!!Example
(:source lang=arduino tabwidth=4:)
#include <MouseController.h>

// Initialize USB Controller
USBHost usb;

// Attach mouse controller to USB
MouseController mouse(usb);

void mouseMoved() {
Serial.print("Move: ");
Serial.print(mouse.getXChange());
Serial.print(", ");
Serial.println(mouse.getYChange());
}

void setup(){
Serial.begin(9600);
}

void loop(){
usb.Task();
}
(:sourceend:)

!!!!See Also
*[[/Reference/MouseDragged | mouseDragged]]()
*[[/Reference/MousePressed | mousePressed]]()
*[[/Tutorial/MouseController]] example\\
\\

Share