-
-
Notifications
You must be signed in to change notification settings - Fork 3
Installation.md
Trent M. Wyatt edited this page Apr 21, 2025
·
1 revision
This guide provides step-by-step instructions to set up MicroChess on your Arduino board. MicroChess is designed to run on Arduino platforms with less than 2K RAM and 32K program flash, such as the Arduino Uno or Nano.
Before you begin, ensure you have:
- An Arduino board (e.g., Arduino Uno, Nano, or compatible).
- An 8x8 LED strip or matrix compatible with the FastLED library (optional for visual display).
- A computer with the Arduino IDE installed.
- A USB cable to connect the Arduino to your computer.
- Git installed (optional, for cloning the repository).
-
Clone or Download the Repository
- Option 1: Clone the repository using Git:
git clone https://github.com/ripred/MicroChess.git
- Option 2: Download the repository as a ZIP file from GitHub and extract it to a folder.
- The repository contains all necessary source files (e.g.,
MicroChess.ino
,board.h/cpp
, etc.) and visual assets.
- Option 1: Clone the repository using Git:
-
Install the Arduino IDE
- Download and install the Arduino IDE from https://www.arduino.cc/en/software.
- Follow the installation instructions for your operating system (Windows, macOS, or Linux).
-
Install the FastLED Library
- MicroChess uses the FastLED library to control the LED strip for board visualization.
- Open the Arduino IDE, go to Sketch > Include Library > Manage Libraries.
- Search for “FastLED” and install the latest version of the FastLED library.
-
Open the MicroChess Project
- Launch the Arduino IDE.
- Open the
MicroChess.ino
file from the cloned or extracted MicroChess folder:- Go to File > Open, navigate to the MicroChess folder, and select
MicroChess.ino
.
- Go to File > Open, navigate to the MicroChess folder, and select
- The IDE will automatically load all related source files (e.g.,
board.cpp
,move.cpp
) in tabs.
-
Connect Your Arduino
- Connect your Arduino board to your computer via a USB cable.
- In the Arduino IDE, select your board:
- Go to Tools > Board and choose your Arduino model (e.g., Arduino Uno).
- Select the correct port:
- Go to Tools > Port and choose the port your Arduino is connected to (e.g., COM3 on Windows, /dev/ttyUSB0 on Linux).
-
Configure the LED Strip (Optional)
- If using an 8x8 LED strip or matrix, connect it to your Arduino as specified in the FastLED library documentation (typically involves a data pin, e.g., pin 6).
- Ensure the LED strip is compatible with FastLED (e.g., WS2812B or similar).
- The
led_strip.cpp
file configures the LED output; no code changes are needed unless using a custom setup.
-
Upload the Sketch
- Click the Upload button (right arrow) in the Arduino IDE to compile and upload the MicroChess sketch to your Arduino.
- Monitor the status bar for compilation and upload progress. If errors occur, check your board/port settings or library installation.
-
Open the Serial Monitor
- To interact with MicroChess (e.g., input moves, view game state), open the Serial Monitor:
- Go to Tools > Serial Monitor or press
Ctrl+Shift+M
.
- Go to Tools > Serial Monitor or press
- Set the baud rate to 9600 (as defined in
MicroChess.ino
). - You should see the initial board state and prompts for input.
- To interact with MicroChess (e.g., input moves, view game state), open the Serial Monitor:
-
Compilation Errors: Ensure all source files are in the same folder as
MicroChess.ino
and the FastLED library is installed. -
LED Strip Not Working: Verify connections, check the FastLED library documentation, and confirm the correct pin is used in
led_strip.cpp
. - Serial Monitor Issues: Ensure the correct baud rate (9600) and port are selected.
-
Out of Memory: MicroChess is optimized for low memory, but if issues arise, reduce the search depth in
options.h
.
Once installed, see the Usage guide to start playing or observing MicroChess games. For a deeper understanding, explore the Code Structure.
MicroChess | GitHub Repository | License: MIT | Contributing
© 2025 Trent M. Wyatt. All rights reserved.