Skip to content

Installation Guide

Matthew Krohn edited this page Aug 11, 2021 · 3 revisions

Additional hardware

AutoMaxLair requires some hardware to function. For a comprehensive hardware setup guide, refer to the SwSh-Arduino GitHub page. To summarize, you will need:

  1. A Nintendo Switch (the Switch Lite will not work as the HDMI output is required.
  2. A computer that you can leave on for hours at a time while the bot is running.
  3. An HDMI capture card or capture stick so the computer can view the HDMI output of the Switch.
  4. A microcontroller such as an Arduino or Teensy. We support any device that has a hardware serial port and uses a atmega32u4, atmega16u2, or at90usb1286 microcontroller.
  5. A USB-to-UART converter. We recommend buying one that uses the CP210x family of chips manufactured by Silicon Labs.
  6. Wires for connecting the USB-to-UART converter to your microcontroller. See the guide linked above for more details.

Software installation

All of AutoMaxLair's code can be found in this GitHub repository. To download the latest version, head to the releases page. Download the zipped files and extract them in a convenient place.

AutoMaxLair also requires additional software to run that is not included in the GitHub repository. This section will guide you through installing these necessary external tools.

Python installation

  1. Go to Python's downloads page.
  2. If you are not using Windows as your operating system, navigate to the page relevant to your operating system.
  3. Download the latest version 3.8 version (3.8.9 at the time of this writing) from the "Looking for a specific release?" section. We officially support Python 3.6-3.8, although 3.9 should work as well.
  4. When the installer has finished downloading, run it to begin installing Python
  5. IMPORTANT (for Windows users only): during the installation, select the option to add Python to the PATH. Not doing so will result in errors later on.
  6. Finish installing Python.

Python module installation

AutoMaxLair requires additional Python modules that are not included in the standard library. They are available on the Python Package Index and can be installed using pip.

Windows users

  1. Double click install-requirements.bat. A text window will open and will show some details and progress on the modules being installed.

Troubleshooting

Error: An error shows up saying 'pip' is not recognized as an internal or external command, operable program or batch file.

Resolution: Python was not added to the PATH during installation. Return to the section on Python installation.

Mac users

  1. Install the modules from the command line.
    pip install -r /path/to/requirements.txt
    If you're unfamiliar with the command line, you can type pip install -r and then drag the requirements.txt file into the terminal

Tesseract installation

Tesseract OCR is an engine for reading text from images. We use it to read text from the Switch video output so we can make decisions based on that text.

Windows users

  1. Go to the Tesseract repository in the UB Mannheim Github.
  2. Download and install the appropriate version for your operating system. Most users should download the 64-bit version. Make note of where you install Tesseract as this information is needed later.
  3. If your game language is not English, you need to download Tesseract language data specific to your language. These files can be found on the Tesseract GitHub. After locating the relevant file (e.g., fra.traineddata for French) and downloading it, move it to the tessdata folder in your Tesseract installation folder.

Mac users

  1. Install homebrew.
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install enchant and tesseract.
    brew update
    brew install enchant
    brew install tesseract
  3. Install extra Tesseract languages as needed using brew install tesseract-lang

Microcontroller programmer installation

AutoMaxLair uses a microcontroller to send button presses to the switch by pretending to be a USB controller. You will need to install a program to load the microcontroller programs we supply onto your microcontroller.

Teensy 2.0 or Teensy 2.0++

  1. Go to the Teensy Loader Page on the PJRC website and download the appropriate version of Teensy Loader for your operating system.

Arduino Uno

Coming soon!

Driver installation for USB-to-UART adaptor

Most of the time, your computer will automatically install the correct drivers for your USB-to-UART adaptor. However, some users may have to manually install drivers for this device.

CP201x devices

  1. Visit the Silicon Labs page on driver installation and follow the instructions there.

PLxxxx devices

Knock-off devices (which are common) may not be supported by the default drivers. If your device is not working, a workaround can be found here.