i tried to connect arduino, and test it as a controller. this is the code:
#include "Mouse.h"
void setup()
{
pinMode(7, INPUT);
Mouse.begin();
}
void loop()
{
if (digitalRead(7) == HIGH) {
Mouse.click()
}
}
but for some reason, it doesen't work and sends me an error message
C:\Users\rverm\Documents\Arduino\lcd screen\lcd screen.ino: In function 'void setup()':
C:\Users\rverm\Documents\Arduino\lcd screen\lcd screen.ino:7:3: error: 'Mouse' was not declared in this scope
Mouse.begin();
^~~~~
C:\Users\rverm\Documents\Arduino\lcd screen\lcd screen.ino: In function 'void loop()':
C:\Users\rverm\Documents\Arduino\lcd screen\lcd screen.ino:13:1: error: 'Mouse' was not declared in this scope
Mouse.click()
^~~~~
Compilation error: exit status 1}
It shows you that you should provide complete information
===
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project See About the Installation & Troubleshooting category.
But you got a different error that you did not post.
C:\Users\sterretje\AppData\Local\Temp\arduino_modified_sketch_576321\sketch_jan20a.ino: In function 'void loop()':
sketch_jan20a:21: error: expected ';' before '}' token
}
^
...
...
exit status 1
expected ';' before '}' token
So you're more-than-likely missing a semi-colon somewhere