This variant was specifically developed for and tested on a Seeeduino XIAO microprocessor board.
It is currently dependent upon the Adafruit_TinyUSB library, but should be easy to adapt to any TinyUSB based environment in the future.
Abbreviated instructions for installing and setting up Arduino IDE v2.0.0-rc5 or greater for development.
- Install Arduino IDE
v2.0.0-rc5
or greater (v1.8.x
may also work but you will not see thesrc
folder that contains the mouse helper utility class). - Copy this
agbgtc_tinyusb
folder into yourArduino
project folder. - Open the
agbgtc_tinyusb.ino
file in the Arduino IDE. Notice that thesrc
files must be retained in tact because there are relative references to it in the program. - Add the Seeed Studio board package definitions using
File ⮕ Preferences
and adding the URL:https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
- Download the
Seeeduino
board drivers usingTools ⮕ Board Manager
. - Download the
Adafruit_TinyUSB
version0.10.5
usingTools ⮕ Manage Libraries
. You must select version0.10.5
until Seeeduino releases an update (due to a breaking change in the1.x
release).
For your first run, you can skip this step and use the default example texture. This allows you to verify your initial setup before creating your own textures.
- Use the
GBG_Texture_Builder
utility to convert your image to a CSV representing the texture pixel data. - Copy the CSV numbers into the image data array (
images[][IMAGE_DATA_LEN]
) in the program. If you're on a Mac thepbcopy
utility is a quick way to copy the CSV data into your pasteboard (e.g.,pbcopy < file.csv
and then⌘ Command + V
to paste). - Delete any example image data that you don't want.
- I've created over 28 images in one session without any problems. It's just limited by the amount of
PROGMEM
that is available on your board (and how long you want to wait).
- Plugin the device to the computer.
- Select the
Seeeduino XIAO
Board and Port using theTools
menu. - Select the
TinyUSB
Stack usingTools ⮕ USB Stack
. - Upload the program to the board.
- Unplug the XIAO board from the computer.
- Plug the Board into the Nintendo Switch USB-C port.
- Bring up a Game Builder Garage game and open programming mode.
- Trigger (or jump the start pin) to start creating the textures. By default this is pin 2. You can change this later or use a breadboard with a switch, etc. Be careful to only use 3.3V to jump the input pin signal because the inputs on this board can only tolerate 3.3V even though they provide a 5v converter pin as well.
- The light will stay solid while it's creating textures. Do not disturb the mouse or touch screen while it's working.
- Unplug when complete and the LED is alternating.