Arduino Function: Mouse.begin

Description

This function emulates the mouse connected to a computer. begin() must be called before controlling the computer.

Syntax

Mouse.begin()

Returns

none 

Examples

void setup(){
pinMode(2, INPUT);
}

void loop(){

//initiate the Mouse library when button is pressed
if(digitalRead(2) == HIGH){
Mouse.begin();
}
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc