So I'm trying to get my Micro to work with the joystick library and my potentiometer but it gives the error. I have about 0 hours of programming experience so help is appreciated.
My code:
#include <Joystick.h>
#define joyThrottle A0
Joystick_ Joystick(0x15, JOYSTICK_TYPE_JOYSTICK, 3, 0, false, false, false, false, false, false, false, true, false ,false, false
eRRconst bool initAutoSendState = true;
int throttle_ = 0;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
Throttle_ = analogRead(joyThrottle);
throttle_ = map= map(throttle_, 0, 1013, 0,255);
Joystick.setThrottle(throttle_);
delay(10);
}
Error:
Error: cannot convert 'long int' to 'long int(long int, long int, long int, long int, long int)' in assignment
exit status 1
expected ')' before 'const'
please read forum's rules that are pinned at the top of the forum and fix your post (code tags)
please edit your post, select the code part and press the </> icon in the tool bar to mark it as code. It's barely readable as it stands. (also make sure you indented the code in the IDE before copying, that's done by pressing ctrlT on a PC or cmdT on a Mac)