Sudoku Solver

Building Instructions

Parts list
Building Instructions

Connect one of the 35 cm cable to the light sensor. The cable should run between the beams attached to the motor. Do this before step 55 of the building instructions.


2 - Light sensor
A - Back motor
B - Front motor
C - Pen elevator motor

The most crucial part of the robot is the position of the light sensor. It should be positioned approximately 1 mm above the surface. (A plastic card should just fit under the sensor without touching it)

Attach a soft tip pen with rubber bands. (I used a Stabilo Pen 68)

Downloading files to the brick

Unzip to a new directory.
The files should be downloadable to the brick using the lego mindstorms software:

- Create a new project (File/New)
- Press the button "NXT window"

- Select the Memory tab
- Press the download button
If you are having problems downloading try the following:

Delete other program files and sound files etc to make room.
Update the NXT Firmware. I'm using NXT Firmware 1.05 on my brick. You can download and install firmware from the LEGO Mindstorms NXT software. (Tools/Update NXT Firmware...)

Running Sudoku Solver

- Print the sudoku pdf. Note that it must have the original size. Maybe you have to adjust the printer properties to avoid scaling or zooming.
- Tape one of the sudoku sheet to the surface. If you are using the empty grid and write the digits yourself, make sure to write them with the same size as the digits of the printed sheets.
- Adjust the height of the pen so that it touches the paper when the pen elevator is in it's lowest position. The pen should be set in upper position before starting the program.
- Place the robot so that the wheels fits inside the squares. It's important that the robot is well centered sideways and aligned with the sudoku puzzle.
- Position the sensor arm by turning the gear on the motor axle so that the pen is centered.
- Start the program.
The program starts with lowering the pen and drawing a short line. This is just a test to see if the pen is working and is correctly mounted. It's not that funny if the robot scans the whole sudoku puzzle (which could take well over twenty minutes) and then fails writing the digits because the pen doesn't reach down to the paper.

Source Code

You don't need the source code unless you want to modify it.
The program is written in NXC using Bricx Command Center. It cannot be edited or viewed in the LEGO Mindstorms software. (It can be viewed in notepad)

Hans Andersson 2021

This website was created with Mobirise templates