Hi, I am brand new to Arduino. I have downloaded a library and sketch but keep getting this error and don't know where to start to fix the issue any help would be appreciated.
Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Micro"
C:\Users\Joe\AppData\Local\Temp\arduino_modified_sketch_210299\ANALOG_EBRAKE.ino: In function 'void setup()':
ANALOG_EBRAKE:14:4: error: 'Joystick' was not declared in this scope
Joystick.begin();}
^~~~~~~~
C:\Users\Joe\AppData\Local\Temp\arduino_modified_sketch_210299\ANALOG_EBRAKE.ino:14:4: note: suggested alternative: 'Joystick_'
Joystick.begin();}
^~~~~~~~
Joystick_
C:\Users\Joe\AppData\Local\Temp\arduino_modified_sketch_210299\ANALOG_EBRAKE.ino: In function 'void loop()':
ANALOG_EBRAKE:22:2: error: 'Joystick' was not declared in this scope
{Joystick.setThrottle(mapped);}}
^~~~~~~~
C:\Users\Joe\AppData\Local\Temp\arduino_modified_sketch_210299\ANALOG_EBRAKE.ino:22:2: note: suggested alternative: 'Joystick_'
{Joystick.setThrottle(mapped);}}
^~~~~~~~
Joystick_
Multiple libraries were found for "Joystick.h"
Used: E:\Arduino\libraries\Joystick
exit status 1
'Joystick' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
// Analog eBrake-Handbrake
// PIN A0 to 10k pot output - Throttle Axis
// Use with Arduino ProMicro.
// Tested and working in DiRT RALLY + ASSETTO CORSA
// by AMSTUDIO
// 20.1.2017
#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);}}