Loading...

Reference.MouseDragged History

Hide minor edits - Show changes to markup

October 20, 2012, at 10:11 AM by Scott Fitzgerald -
Changed lines 7-8 from:

mouseDragged() is a function that is called whenever a connected USB mouse is dragged (movement while a mouse button is depressed).

to:

mouseDragged() is a function that is called whenever a connected USB mouse is dragged (movement while a mouse button is being pressed).

October 16, 2012, at 02:51 PM by Scott Fitzgerald -
Changed line 43 from:

Functions

to:

See Also

October 16, 2012, at 02:29 PM by Scott Fitzgerald -
Added lines 1-51:

USBHost : MouseController class

mouseDragged()

Description

mouseDragged() is a function that is called whenever a connected USB mouse is dragged (movement while a mouse button is depressed).

Syntax

(:source lang=arduino tabwidth=4:) void mouseDragged(){ //statements } (:sourceend:)

Example

(:source lang=arduino tabwidth=4:)

  1. include <MouseController.h>

// Initialize USB Controller USBHost usb;

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

void mouseDragged() {

  Serial.print("DRAG: ");
  Serial.print(mouse.getXChange());
  Serial.print(", ");
  Serial.println(mouse.getYChange());

}

void setup(){

  Serial.begin(9600);

}

void loop(){

  usb.Task();

} (:sourceend:)

Functions




Bookmark and Share