I am using a Sparkfun Pro Micro for this project, along with Arduino IDE 2.3.2
I am using the NintendoSwitchControlLibrary from this link below:
This is my biggest problem with my project, I have been working on it for a few weeks now and I cannot go forward with it until I get it to work. My main issue is I cannot get my board to connect to my Nintendo Switch at all, which causes nothing to happen. What I want it to do is to connect to my Nintendo Switch once plugged in (Right now I have it so I'll plug it in once I am on the change Grip/Order screen on my switch). Then once it does this and connects it will press the A button on my Nintendo Switch every second (approx.)
#include <NintendoSwitchControlLibrary.h>
//Before plugging in go to change grip/order to allow pro micro to connect
void connectBoard() {
delay(10000); //Delay to allow board to connect once plugged in
pushButton(Button::L, 5000);
pushButton(Button::R, 5000);
}
void rapidPress() {
pushButton(Button::A,500); //Press the A button every half second
}
void setup() {
delay(5000); //Extra time for controller to connect
connectBoard();
}
void loop() {
rapidPress();
delay(1000); //Wait 1 second before pressing again
}
Edit: I made sure to install the SparkFun AVR boards, and am uploading to my Sparkfun Pro Micro.
Edit: I am not using bluetooth, I am using the USB cord through either the dock or switch's USB-C
In that case, the actual code is in the library. Either study that or raise a support issue with the library authors. I hope you are not in a hurry, open source fixes take a long time to happen if at all.
I've heard a Micro and an Leonardo are practically the same. I'm relatively new to Arduino so I've been struggling with this. I've tried looking through the site with the info for the library, and thought I was setting it up right. Even tried to run an example code but could not get it to connect either. I do not know if I'm missing something, or if theres a step I'm leaving out (I am uploading the file lol, just figured I'd add that)
Is your controller a clone or the real deal. Another group I belong to did a similar project and those with clones had 100% failure while those who spent the big money worked.