A script that takes a png image and draws it as a comment in Mario Maker 2.
- A python script converts the image into an array of colors.
- The array gets written as a const to flash memory.
- Teensy Loader program loads compiled code onto Teensy board.
- The Teensy board reads the colors as instructions and acts as a switch controller to draw the image in-game.
- Nintendo Switch + Mario Maker 2
- Teensy 2.0++ Board
- Python 3.6 or 3.7
- GCC + Make
- Teensy Loader Application
- 320x180 PNG Image
Clone repository and submodule:
git clone https://github.com/zrayyes/MarioMaker2CommentPlotter.git
git submodule init
git submodule update
Install Pillow (Python Imaging Library Fork):
# Optional: Create a virtual environment
python -m venv venv
# Install Pillow
pip install Pillow==6.1.0
Run script:
# No dithering
python start.py image.png
# With dithering
python start.py image.png x
# You will find a preview.png to see what the image would approximately look like on the switch
Compile:
make
Afterwards:
- Connect teensy board.
- Flash outputted Joystick.hex onto teensy board using Teensy Loader.
- Turn on Mario Maker 2, open the comment screen, navigate to and enter drawing tab.
- Turn off active controller.
- Connect Teensy and wait. If it fails to connect, disconnect the cable and try again.
Input:
Output:
The emote used (aurOk) belongs to Twitch streamer Aurateur.
- Measure how long it takes for a single column to draw (single color). (2:22, 142s)
- Reduce time taken for single step. Skip paint step? (1:12, 72s)
- Reduce time waiting between move down (29s)
- Reduce time waiting after column move(28s)
- Need to test new time numbers are working properly
- Reduce time switching colors
- Skip painting (and switching to) White.
- Add how-to instructions
- Dockerfile?