Hi, I'm kinda newbie and I need help. I got the error 'Joystick'was not declared in this scope, to be precise:
C:\Users\piotr\Desktop\Analog-E-Brake-master\ANALOG_EBRAKE\ANALOG_EBRAKE.ino: In function 'void setup()':
ANALOG_EBRAKE:13: error: 'Joystick' was not declared in this scope
Joystick.begin();}
^
C:\Users\piotr\Desktop\Analog-E-Brake-master\ANALOG_EBRAKE\ANALOG_EBRAKE.ino: In function 'void loop()':
ANALOG_EBRAKE:21: error: 'Joystick' was not declared in this scope
{Joystick.setThrottle(mapped);}}
^
exit status 1
'Joystick' was not declared in this scope
Sketch:
#include <Joystick.h>
void setup()
{pinMode(A0, INPUT);
Joystick.begin();}
const int pinToButtonMap = A0;
void loop()
{int pot = analogRead(A0);
int mapped = map(pot,0,1023,0,255);
{Joystick.setThrottle(mapped);}}
I downloaded this from one guy tutorial. For everyone it works, but not for me. what should I do?