Disclaimer:

Yes, I have written a very similar tutorial to this one in the past. However, many changes have been made since then, and a complete rewrite is necessary to document them all without errors. Also,

this is not a beginner project!

If you do not have experience using boards such as the Arduino or Teensy, as well as the Windows command line, this may not be for you. A lot of debugging and troubleshooting will likely be necessary. With that in mind, let's get started!

Spoiler

You'll need:

- One of the following:

- An atmega32u4 board such as the Teensy 2.0 or Arduono Lenardo

- An at90usb1286 board such as the Teensy 2.0++

- An Arduino Uno R3

-

LightningStalker's Splatmeme Printer repo

-

LUFA (Lightweight USB Framework for AVRs)

-

Gimp

- A USB C to USB A adapter to plug the Teensy into the Switch while in handheld mode (using the dock's ports can cause issues)



Here are a few boards to choose from. All the following should work:

Setting up the repository for use

Code: C:\SwitchFightstick Make a directory where you'll store everything. Something simple is fine, but I have mine in Open up the Splatmeme Printer .zip and go into the splatmeme-printer-master folder. Select everything inside that and extract it to the directory you made in step 1. Open up the LUFA zip and rename the "lufa-LUFA-170418" folder to "LUFA", then extract it to the directory you made in step 1. Install Python 2.7, then go to the directory it was installed to (should be C:\Python27) and find python.exe. Rename it to python2.exe and copy it to the directory you made in step 1. Install MinGW, and if it asks for packes to install alongside it, select the "basic" package (name may very, but it's something like that). Open up the Start menu on Windows and search for "path"; one of the results should be "Edit the system environment variables". Select that. At the bottom, press the "Environment variables" button. Under "System variables" (the bottom window), find "Path" and click Edit. Code: C:\MinGW\bin Press "New" and add MinGW's bin directory, which should be

You should now be finished setting up.



Converting your image

Here we'll actually convert the image to a format you can use with the printer. This is where Gimp comes in.

Open up Gimp and press Ctrl+N to make a new canvas. Make it 320 pixels wide and 120 pixels tall. Paste your image onto the canvas and use the resize and move tools to make it fit, or draw something entirely of your own if you like. As long as it fits on the canvas. Go to the "Image" menu on the top bar, hit "Mode" and select "Indexed" On the window that pops up, make sure you select "Use black and white (1-bit) pal ette" and set dithering to normal. Don't change anything else. If it doesn't look good, hit undo and mess with the contrast and stuff until it looks the way you want it. Once the image is as you want it, hit File > Export as... and navigate to the folder you made at the beginning of this guide. Set the image format as "Raw image data (.data)" and name it "image.data" (really, you can name it whatever you want as long as it ends in .data) Open up a command line and navigate to the directory you saved it to (should be the same as the one you made at the beginning of this guide) Run the command Code: python2 bin2c.py image.data Code: image.data Code: image.c

Programming your board

This part actually varies between boards. Select the one based on which board you have.



atmega32u4:

Spoiler You'll need:

- Arduino IDE



Steps:

In the directory you made, find the file simply called "makefile" and open it up in your favorite text editor. Find the line that says Code: at90usb1286 Code: atmega32u4 Open up the Arduino IDE after plugging in your board and go to File > Preferences and select Code: Show verbose output during: upload Upload any sketch; doesn't matter which. You'll need part of the output shown in the command line for the next step. Find the line with the Code: avrdude Replace the parts of the command that point to the directory and files and stuff with the directory you made as well as "Joystick.hex" as the target. Make sure the Code: -P/dev/xx Quickly double tap the reset button on the board and press enter on the command line. Might take a couple tries to get the right timing, but it'll work. You can now plug your board into the Switch and begin! It should automatically select the right tool and positioning of the cursor. You can now plug your board into the Switch and begin! It should automatically select the right tool and positioning of the cursor.



at90usb1286:

Spoiler You'll need:

- The

Unzip teensy_loader_cli.exe into the repo directory. Open a command line and navigate to the repo directory. You should already have the image.c file you made in the last portion of this guide. Run the command Code: make Run the command Code: teensy_loader_cli -mmcu=at90usb1286 -w Joystick.hex You can now plug your board into the Switch and begin! It should automatically select the right tool and positioning of the cursor. - The Teensy Loader program You can now plug your board into the Switch and begin! It should automatically select the right tool and positioning of the cursor.



Arduino Uno R3:

Spoiler You'll need:

-

Open up the makefile in your favorite text editor and replace Code: at90usb1286 Code: atmega16u2 Open up a command line and navigate to the folder, then run the command Code: make Follow these instructions to flash the .hex file to the Uno while it's in DFU mode You can now plug your board into the Switch and begin! It should automatically select the right tool and positioning of the cursor. Set the Arduino to DFU mode (note that to get the original Arduino functionality back, you'll need to re-flash the original firmware)You can now plug your board into the Switch and begin! It should automatically select the right tool and positioning of the cursor.

Troubleshooting / Common Issues