Hello, I came with the first project, I took the initiative to create an analog hand brake with the following Pro Micro ATmega32U4 and KY 024. This reference base was DIY Analog USB Handbrake - YouTube. I took this library GitHub - MHeironimus/ArduinoJoystickLibrary: An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support. and put the folder inside libraries and the code used is this even informed in the video
#include <Joystick.h>
void setup()
{pinMode(A3, INPUT);
Joystick.begin();}
const int pinToButtonMap = A3;
void loop()
{int pot = analogRead(A3);
int mapped = map(pot,525,870,0,255);
{Joystick.setThrottle(mapped);}}
previously I took another code and put it in and just changed what it represented in the other video, it worked but when I put it to test on the game controller it didn't come out of 43% nor did it show any sign of functioning
#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 see that it didn't work, I try to use the joystick folder provided by GitHub - MHeironimus/ArduinoJoystickLibrary: An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support. and enter this error
Arduino: 1.8.13 (Windows 10), Board: "Arduino Micro"
C: \ Users \ THMN \ Desktop \ sketch_oct09c \ sketch_oct09c.ino: In function 'void setup ()':
sketch_oct09c: 7: 4: error: 'Joystick' was not declared in this scope
Joystick.begin ();}
^ ~~~~~~~
C: \ Users \ THMN \ Desktop \ sketch_oct09c \ sketch_oct09c.ino: 7: 4: note: suggested alternative: 'Joystick_'
Joystick.begin ();}
^ ~~~~~~~
Joystick_
C: \ Users \ THMN \ Desktop \ sketch_oct09c \ sketch_oct09c.ino: In function 'void loop ()':
sketch_oct09c: 15: 2: error: 'Joystick' was not declared in this scope
{Joystick.setThrottle (mapped);}}
^ ~~~~~~~
C: \ Users \ THMN \ Desktop \ sketch_oct09c \ sketch_oct09c.ino: 15: 2: note: suggested alternative: 'Joystick_'
{Joystick.setThrottle (mapped);}}
^ ~~~~~~~
Joystick_
Multiple libraries were found for "Joystick.h"
Used: E: \ Installed Programs \ Arduino \ libraries \ Joystick
Not used: C: \ Users \ THMN \ Documents \ Arduino \ libraries \ ArduinoJoystickLibrary-master
exit status 1
'Joystick' was not declared in this scope
This report would have more information with
"Show detailed output during compilation"
option can be activated in "File -> Preferences"
When the photos are a reference of the lights it looks like something has already been recorded, you would have to delete what was recorded or when you provide another code and load it performs the replacement of the old code by overwriting it
I hope I have described all the possible errors and information necessary for all of you to help me
Thank you very much in advance