Source: https://mokxi.com/learn/path/build-electronic-chessboard
Updated: 2026-11-20

All paths

# Build an electronic chessboard

Build a chessboard that knows where every piece is: reed switches and an expander, move detection, the rules, LED hints and a small engine to play.

Arduino Uno R3 Free 6 lessons 6 h 3 chapters 2,280 XP Maker · Advanced +250 XP

0 of 6 done

Start the course free Reed square matrix Lesson plan for teachers

What you will build

## 3 projects, built step by step

6 lessons in 3 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

### Move detection

Turn reed events into moves: a lift and a place, a piece put back, and a capture made of two lifts, with every square debounced first.
Open it in the simulator

Chapter 2 project

### LED hints

Light the board: every piece dim, the last move in blue, and when a piece is picked, every square it may legally go to in green.
Open it in the simulator

Chapter 3 project

### Project: play the board

The finished board: moves from the reeds or the keyboard, LED hints, the engine's replies, a hint for you, and a fresh game when you want one.
Open it in the simulator

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Feel the pieces

Reed switches under the squares, and moves from lifts and places.

Open 250 XP

### Reed square matrix

Read the squares of a chessboard: a reed switch under each, a magnet in every piece, and sixteen of them in one I2C read through an MCP23017.

0 of 5 steps

Start What is in it

Project Locked 500 XP

### Move detection

Turn reed events into moves: a lift and a place, a piece put back, and a capture made of two lifts, with every square debounced first.

0 of 5 steps

4 questions, graded as you go.

Chapter 2

## Know the rules

Every legal move, and lights that show them.

Locked 250 XP

### Legal moves

Teach the board the rules: a 0x88 board, every piece's moves, a king that may never be left in check, and checkmate and stalemate.

0 of 5 steps

Project Locked 500 XP

### LED hints

Light the board: every piece dim, the last move in blue, and when a piece is picked, every square it may legally go to in green.

0 of 5 steps

4 questions, graded as you go.

Chapter 3

## Play the board

A small engine with alpha-beta, then the finished board.

Locked 250 XP

### A chess engine

Give the board a mind: an evaluation, negamax with alpha-beta pruning three plies deep, captures first, and an honest look at how weak three plies is.

0 of 5 steps

Project Locked 530 XP

### Project: play the board

The finished board: moves from the reeds or the keyboard, LED hints, the engine's replies, a hint for you, and a fresh game when you want one.

0 of 6 steps

4 questions, graded as you go.

Syllabus

## Every lesson in the course

All 6 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Feel the pieces

- Reed square matrix Read the squares of a chessboard: a reed switch under each, a magnet in every piece, and sixteen of them in one I2C read through an MCP23017.
- Move detection Turn reed events into moves: a lift and a place, a piece put back, and a capture made of two lifts, with every square debounced first.

Chapter 2

### Know the rules

- Legal moves Teach the board the rules: a 0x88 board, every piece's moves, a king that may never be left in check, and checkmate and stalemate.
- LED hints Light the board: every piece dim, the last move in blue, and when a piece is picked, every square it may legally go to in green.

Chapter 3

### Play the board

- A chess engine Give the board a mind: an evaluation, negamax with alpha-beta pruning three plies deep, captures first, and an honest look at how weak three plies is.
- Project: play the board The finished board: moves from the reeds or the keyboard, LED hints, the engine's replies, a hint for you, and a fresh game when you want one.

Keep going

## The next course on your track

Build an electronic chessboard is part of the maker track, a ladder of courses from zero to expert.

Next course

### Build an elevator

A four-floor model lift on a stepper: calls and the elevator algorithm, a state machine, homing a lead screw hoist, doors with an eye, a safety chain, and a rush hour to measure it.
Open the next course

Track

### Maker track

Follow the starter kit you already own, then build a claw machine, a balance bot, a handheld console or an LED cube, each a short course checked by the simulator.
See every course on the track

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About Build an electronic chessboard

Is Build an electronic chessboard free?

Yes. All 6 lessons of Build an electronic chessboard are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Build an electronic chessboard take?

About 6 hours: 6 lessons in 3 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Move detection, LED hints and Project: play the board.

Where do I start?

With "Reed square matrix", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
