Stops emulating the mouse connected to a computer. To start control, use Mouse.begin()
.
Mouse.end()
None.
None.
#include <Mouse.h>
void setup() {
pinMode(2, INPUT);
// Initiate the Mouse library
Mouse.begin();
}
void loop() {
// If the button is pressed, send a left mouse click
if (digitalRead(2) == HIGH) {
Mouse.click();
// Then end the Mouse emulation
Mouse.end();
}
}