Copy the code at Arduino: USB Gamepad and set the variable ENABLE_ANALOG1
to:
-
true
to enable Analog Stick support. false
to disable Analog Stick support.
Code works with the latest Arduino IDE 1.8.5.
Follow the tutorial I made on How To Program the Pro Micro with Arduino.
[…] Here’s how to enable Analog Stick support. […]
Hi,
Can i use this code if i want to use 2 analog sticks?
#include
#define PINS 14
#define ENABLE_ANALOG2 true
int X1 = A0;
int Y1 = A1;
int X2 = A2;
int Y2 = A2;
Because it’s giving a error on the code.
Thanks in advance, F
Which code is it?