Nintendo Switch Auto-Clicker
by tinyboatproductions in Circuits > Arduino
10730 Views, 13 Favorites, 0 Comments
Nintendo Switch Auto-Clicker
This is a simple project that I would consider beginner friendly. It is only a few components, very little code, and it comes together pretty quickly.
I have included two version of this project. One that is battery powered, that's what the pictures show, and one that is corded, powered through the USB port on the Arduino.
This projects works up pretty quickly so I think if you have the parts you could knock this out in a day. Only that long just because printing the case takes a while. Otherwise the soldering can be done in under an hour.
Give it a shot. If you have questions leave a comment, I'll try to help.
Supplies
Materials
I've provided links for your continence. I don't make any money off of this so use what ever you have, or what ever makes sense for you.
Required
- Arduino Nano
- 9g Micro Servo
- Included Hardware
- Case (3D printed included or other)
- 2-M3 screws (at least 6mm)
- Solder
Optional
- 9v Battery Cradle
- 9v Battery
- Slide Switch
- Super Glue
- Heat Shrink Tubing
- Masking Tape
Tools
- Soldering Iron
- Wire Strippers
- Side Cutters
- Arduino Cable
- Pliers
- 3D printer (optional)
- Screw Driver
Case
If you done any of my other projects you'll know where I tend to start, the case. This is because this whole project comes together really fast, except the case. When I printed the case it took about 4 hours total. So if you plan on doing this tomorrow, print the case today.
Case: https://www.thingiverse.com/thing:4832347
WARNING: THIS CASE IS DESIGNED FOR THE ORIGINAL NINTENDO SWITCH JOY-CONS. USE AT YOUR OWN RISK ON ANY AFTER MARKET CASES.
I printed the case for this project as I have a 3D printer and I found this an easy solution. Don't feel like you need a printer to do this, but you will need a case that holds at least the servo in place while in use.
In the linked thing I have included 2 versions of this case and project as a whole, either battery powered to be totally wireless or with an opening for the cord so the arduino can be plugged in so you don't have to worry about getting or having 9v batteries.
Soldering
The soldering portion of this project is pretty quick.
To start I removed all the pins from my arduino board by clipping the plastic supports between each pin. Then I could take the my soldering iron and a pair of pliers and remove one pin at a time. For the programing header at on the top I was able to just hold the soldering iron on the pin and pull it out from the plastic support without clipping it.
Next clip the connector off of the servo and strip a bit of each wire. Then feed the wires through the hole in the case and drop it into place in the case.
For the battery powered option you will need to solder the switch in to the positive wire of the battery cradle. I added a bit of heat shrink on the wires just to make sure they couldn't short out. Next solder the servo the same way as the corded version below.
For the corded version. You only need to solder the servo to the Arduino. With the red wire to the 5v pin the brown wire to a ground pin (other than than the one next to the Vin pin) and the orange wire to the D9 pin.
At this point you are like 95% of the way done.
Code
Before we close everything in the case we better up load some code so here it is. This code is basically a glorified example sketch, I just changed the overall rotation angle and the timing to make it go quicker.
#include <Servo.h>
Servo myservo; //Create the Servo object to do all the hard work int maxpos = 30; //The max rotation angle int minpos = 0; //The min rotation angle int waittime = 5;//How long to wait before moving the arm. 5ms works well void setup() { // put your setup code here, to run once: myservo.attach(9); //Attach the Servo object to the right pin } void loop() { // put your main code here, to run repeatedly: for(int pos = minpos; pos <= maxpos; pos++){ //move the servo to the maximum position, press the button myservo.write(pos); delay(waittime); } for(int pos = maxpos; pos >= minpos; pos--){ //move the servo to the minimum position, release the button myservo.write(pos); delay(waittime); } delay(15); }
Final Assembly
No that everything is soldered up and the code is uploaded we just need to put everything into the case and close it up.
I used a bit of super glue to put the switch in place (skip this if you are doing the corded version).
Put the battery in the back the board under the servo, put the cover on, and screw it in place. A note here is that I wrapped my 9v battery in some masking tape as their casings are conductive so it could cause a short.
For the corded version, its very similar. I would plug the board in through the cover and then screw it in place, just to make sure the board sits in the right spot