?
  1. An atmega32u4 based board

    9.5%
  2. An at90usb1286 based board

    26.2%
  3. An Arduino Uno R3 board

    64.3%
  4. 42 voter(s)
  1. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
    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!

    For those of you who may not know what this is all about, this is what I'm talking about:
    This allows you to use any atmega32u4 or at90usb1286 board (as well as the Arduino Uno R3) to draw Splatoon 2 posts automatically. You can take images off the internat and convert them for use, or you can draw your own material on the PC itself and convert it to be drawn on the Switch automatically.

    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
    - MinGW for Windows
    - Python 2.7
    - 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:

    Remember, you're not limited to just the boards you find on here. Any board you find out in the wild that uses an atmega32u4, at90usb1286, or atmega16u2 should work. These are just some that I found that are on the cheaper side, but should work just fine.

    Canada:
    Xcsource Teensy 2.0++ from Amazon (I'm using this one currently)
    Sodial Teensy 2.0 from Amazon
    Xcsource Pro Micro from Amazon
    no-name Pro Micro from AliExpress
    Beetle atmega32u4 mini dev board from AliExpress


    USA: (I'm in Canada and don't usually order from US-based sites so I apologize for inaccuracies)
    HiLetgo Pro Micro from Amazon
    OSOYOO Pro Micro from Amazon
    TENSTAR ROBOT Pro Micro from AliExpress
    Beetle atmega32u4 mini dev board from AliExpress

    Setting up the repository for use
    First off, you'll want to acually get the stuff up and running. Here's how you do that.
    1. Make a directory where you'll store everything. Something simple is fine, but I have mine in
      Code:
      C:\SwitchFightstick
    2. 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.
    3. 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.
    4. 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.
    5. 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).
    6. Open up the Start menu on Windows and search for "path"; one of the results should be "Edit the system environment variables". Select that.
    7. At the bottom, press the "Environment variables" button.
    8. Under "System variables" (the bottom window), find "Path" and click Edit.
    9. Press "New" and add MinGW's bin directory, which should be
      Code:
      C:\MinGW\bin
      .
    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.
    1. Open up Gimp and press Ctrl+N to make a new canvas. Make it 320 pixels wide and 120 pixels tall.
    2. 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.
    3. Go to the "Image" menu on the top bar, hit "Mode" and select "Indexed"
    4. On the window that pops up, make sure you select "Use black and white (1-bit) palette" 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.
    5. 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.
    6. 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)
    7. 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)
    8. Run the command
      Code:
      python2 bin2c.py image.data
      , replacing
      Code:
      image.data
      with whatever you named it. You should now have a file called
      Code:
      image.c
      .
    The image is now ready to be printed!

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

    atmega32u4:
    You'll need:
    - Arduino IDE

    Steps:
    1. In the directory you made, find the file simply called "makefile" and open it up in your favorite text editor.
    2. Find the line that says
      Code:
      at90usb1286
      and change it to
      Code:
      atmega32u4
    3. Open up the Arduino IDE after plugging in your board and go to File > Preferences and select
      Code:
      Show verbose output during: upload
    4. Upload any sketch; doesn't matter which. You'll need part of the output shown in the command line for the next step.
    5. Find the line with the
      Code:
      avrdude
      command and copy the entire command itself and paste it into the command line. Don't hit enter yet.
    6. 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.
    7. Make sure the
      Code:
      -P/dev/xx
      portion shows the correct port number where xx is.
    8. 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.

    at90usb1286:

    You'll need:
    - The Teensy Loader program
    1. Unzip teensy_loader_cli.exe into the repo directory.
    2. Open a command line and navigate to the repo directory.
    3. You should already have the image.c file you made in the last portion of this guide. Run the command
      Code:
      make
      and it should beign to compile. If you get an error, open up the makefile in a text editor again and make sure the LUFA path is set correctly, as well as everything else.
    4. Run the command
      Code:
      teensy_loader_cli -mmcu=at90usb1286 -w Joystick.hex
      , then press the button on your Teensy. It should upload.
    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:

    You'll need:
    - Set the Arduino to DFU mode (note that to get the original Arduino functionality back, you'll need to re-flash the original firmware)
    1. Open up the makefile in your favorite text editor and replace
      Code:
      at90usb1286
      with
      Code:
      atmega16u2
    2. Open up a command line and navigate to the folder, then run the command
      Code:
      make
      . You should be left with a Joystick.hex file along with multiple others that you won't need.
    3. 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.

    Troubleshooting / Common Issues
    Image is inverted:
    • Go back into the image in GIMP: Colors > Map > Rearrange Colormap
    • (drag/drop) swap positions of black & white.
    • export, build, make, transfer, print!
    And you're done! I've only personally tested the at90usb1286 portion of the guide, which worls flawlessly. It's up to you guys to test the rest of it! If you have any issues or questions, feel free to ask, and I'll help as much as I can.

    Edit: Please excuse the formatting with the code windows, I expected them to be inline text and not separate boxes haha
     
    Last edited by dj505, Sep 9, 2017
    Stealphie, Kofus and zaxman22 like this.
  2. Psychdelic

    Psychdelic GBAtemp Regular
    Member

    Joined:
    Nov 25, 2013
    Messages:
    111
    Country:
    United States
    Stupid question since I don't have the game but these posts go where...?
     
  3. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
    Once you post them, they also get posted to either your Facebook or Twitter depending on what you have linked. They also show in-game above your character while you're online and can be seen by others.
     
  4. Izotov

    Izotov Advanced Member
    Newcomer

    Joined:
    Jul 20, 2014
    Messages:
    59
    Country:
    Ukraine
    in last update Coov N100 added this feature
     
  5. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
    Which feature?
     
  6. Izotov

    Izotov Advanced Member
    Newcomer

    Joined:
    Jul 20, 2014
    Messages:
    59
    Country:
    Ukraine
  7. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
    Looks to be a bit more expensive than lots of the microcontrollers you can buy for this tutorial (like the $5 atmega32u4 boards on AliExpress), but still kinda neat!
     
  8. BlastedGuy9905

    BlastedGuy9905 where's the updated autopsy report
    Member

    Joined:
    Apr 13, 2017
    Messages:
    2,299
    Country:
    United States
    Could I use this?
    https://www.aliexpress.com/item/Pro...67-414f-982e-ebe1415217eb&transAbTest=ae803_1

    — Posts automatically merged - Please don't double post! —

    (sorry if that is not even close to what you need, i never used a board like this)
     
  9. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
  10. BlastedGuy9905

    BlastedGuy9905 where's the updated autopsy report
    Member

    Joined:
    Apr 13, 2017
    Messages:
    2,299
    Country:
    United States
    Thanks :D
     
  11. Izotov

    Izotov Advanced Member
    Newcomer

    Joined:
    Jul 20, 2014
    Messages:
    59
    Country:
    Ukraine
    Coov N100 - converter for use Dualshock 3-4, xbox 360\one controllers on Switch/ On aliexpress cost 10$
     
  12. MegaMagikarp

    MegaMagikarp Advanced Member
    Newcomer

    Joined:
    Mar 25, 2015
    Messages:
    74
    Country:
    Taiwan
    I just took a look at this fork of the repo and I see that they made a "png2c.py" so does it mean we can now directly convert png files from Photoshop or other image editing software? I've always had weird experience with gimp so that would be really helpful.

    F̶o̶r̶ ̶s̶o̶m̶e̶ ̶r̶e̶a̶s̶o̶n̶ ̶a̶t̶ ̶f̶i̶r̶s̶t̶ ̶l̶o̶o̶k̶ ̶I̶ ̶t̶h̶o̶u̶g̶h̶t̶ ̶L̶i̶g̶h̶t̶n̶i̶n̶g̶S̶t̶a̶l̶k̶e̶r̶'̶s̶ ̶G̶i̶t̶H̶u̶b̶ ̶p̶r̶o̶f̶i̶l̶e̶ ̶p̶h̶o̶t̶o̶ ̶i̶s̶ ̶s̶o̶m̶e̶ ̶a̶n̶i̶m̶e̶ ̶c̶h̶a̶r̶a̶c̶t̶e̶r̶…̶ ̶w̶a̶s̶ ̶d̶i̶s̶a̶p̶p̶o̶i̶n̶t̶e̶d̶ ̶a̶f̶t̶e̶r̶ ̶l̶o̶o̶k̶e̶d̶ ̶c̶l̶o̶s̶e̶l̶y̶ ̶
     
    Last edited by MegaMagikarp, Aug 28, 2017
  13. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
    Yeah, you can convert PNG files now!
     
    BlastedGuy9905 likes this.
  14. crk14341

    crk14341 Newbie
    Newcomer

    Joined:
    Aug 30, 2017
    Messages:
    3
    Country:
    United States
    So I've gotten through most of the guide and I'm having a bit of trouble when it comes to making the hex file. I'll go to make the file and I'll get this error. What can I do to solve this?
     

    Attached Files:

  15. dj505

    OP dj505 Inexperienced Romhacker
    Member

    Joined:
    Oct 4, 2014
    Messages:
    554
    Country:
    Canada
    When you installed MinGW, did you also install the basic package? Make sure it's installed, and that everything was added to the PATH properly, then reboot
     
  16. crk14341

    crk14341 Newbie
    Newcomer

    Joined:
    Aug 30, 2017
    Messages:
    3
    Country:
    United States
    I've double checked both the installed packages and the PATH and I'm still getting the error. I've even rebooted a couple of times. Do you have any other ideas?
     
  17. HamBone41801

    HamBone41801 Vipera’s Alt
    Member

    Joined:
    Jan 16, 2017
    Messages:
    1,083
    Country:
    United States
    look, I'm gonna be honest with you. this guide is a mess. you didn't even mention the splatmeme repo past the fact that it's required. you also confused usb type a and usb type micro-b (which is what the Teensy ACTUALLY uses). you then failed to mention the required adapters/cables for the other two boards, as well as which (if any) extra packages would be required when installing minGW. please, put more work into your guides next time. the only reason I got it to work is because I already knew what I was doing.
     
  18. Hopeywolf

    Hopeywolf Newbie
    Newcomer

    Joined:
    Jun 26, 2017
    Messages:
    6
    Country:
    United States
    so Ive followed everything and when I try to make it shows

    makefile:30: ../LUFA/LUFA/Build/lufa_core.mk: No such file or directory
    makefile:31: ../LUFA/LUFA/Build/lufa_sources.mk: No such file or directory
    makefile:32: ../LUFA/LUFA/Build/lufa_build.mk: No such file or directory
    makefile:33: ../LUFA/LUFA/Build/lufa_cppcheck.mk: No such file or directory
    makefile:34: ../LUFA/LUFA/Build/lufa_doxygen.mk: No such file or directory
    makefile:35: ../LUFA/LUFA/Build/lufa_dfu.mk: No such file or directory
    makefile:36: ../LUFA/LUFA/Build/lufa_hid.mk: No such file or directory
    makefile:37: ../LUFA/LUFA/Build/lufa_avrdude.mk: No such file or directory
    makefile:38: ../LUFA/LUFA/Build/lufa_atprogram.mk: No such file or directory
    make: *** No rule to make target `../LUFA/LUFA/Build/lufa_atprogram.mk'. Stop.

    Everything is done properly so far, only confusing part is the MinGW part where it gives a list of packages
     
    Last edited by Hopeywolf, Aug 31, 2017
  19. HamBone41801

    HamBone41801 Vipera’s Alt
    Member

    Joined:
    Jan 16, 2017
    Messages:
    1,083
    Country:
    United States
    you might as well just follow a video on youtube. and the basic package is all you need.
     
  20. Hopeywolf

    Hopeywolf Newbie
    Newcomer

    Joined:
    Jun 26, 2017
    Messages:
    6
    Country:
    United States
    everything is done properly
    I get a different error for the other method ERROR 1 with Joystick.c
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - [Tutorial], Printing, Arduino