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()

Parameter Values

  • None

Return Values

  • 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

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Please note: These are Amazon affiliate links. If you buy the components through these links, We will get a commission at no extra cost to you. We appreciate it.

※ OUR MESSAGES