Skip to content

Latest commit

 

History

History
88 lines (57 loc) · 1.23 KB

mouseBegin.adoc

File metadata and controls

88 lines (57 loc) · 1.23 KB
title
Mouse.begin()

Mouse.begin()

Description

Begins emulating the mouse connected to a computer. begin() must be called before controlling the computer. To end control, use Mouse.end().

Syntax

Mouse.begin()

Parameters

Nothing

Returns

Nothing

Example Code

#include <Mouse.h>

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

void loop(){

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

}

See also