Electronic Sudoku Game

Electronic Sudoku Game

In this post, we will teach you how to create Electronic Sudoku Game: Calling all you Sudoku addicts. Play, Create and Solve Sudoku puzzles using this easy to build Arduino based project.

Simple to use with a touch screen and stylus the unit comes preloaded with Sudoku puzzles to play, a help feature to highlight incorrect values and an automated solver button. This project includes a 3D printed case with only seven components including a USB rechargeable battery so it does not require a high degree of electronics experience to complete.

Steps to create an Electronic Sudoku Game:

Step 1: Gather the Materials

Years ago, just for fun, I wrote an excel macro to solve Sudoku Puzzles on a desktop computer. It occurred to me that this could be incorporated into an Arduino Touch Screen device. The perfect fit for this was an Arduino Uno and a compatible 2.8 inch TFT touch screen shield.

Step 2: 3D Print the Case

The 3D case was printed with White PLA with each part oriented so that Lid and Base are facing upwards using the following settings

Layer Height: 0.2mm

Speed: 40mm/s

Nozzle Diameter: 0.4mm

Supports: Enabled

Nozzle Temperature: 210 Degrees

The 3D Model Files are located here on Thingiverse with the touch screen stylus inserts into a cavity under the Arduino PCB and can be removed by sliding out with your finger.

Step 3: Load the Code and Test the Screen

The best place to start is to connect the Arduino Uno with the TFT screen and test the screen. I have subsequently found there are various screens available that have different drivers or settings so here is my recommended approach.

1. Connect the Screen to the Arduino Uno

Carefully align the Arduino Uno and TFT screen pins and ensure they are oriented correctly. In the picture provided, you can see the correct alignment including the noticeable gaps in the Uno and TFT screen pins that help with alignment.

2. Load the Arduino IDE libraries

Firstly download and install the Arduino IDE from here

The code requires the following three libraries to be loaded into the Arduino IDE to enable it to work

3. Calibrate Screen colors and Touch Locations

TFT LCD Screens come with different control chipsets and touchscreen setups. I had quite a challenge with this particular model getting it working and had to make a number of configuration changes before I could get it working satisfactorily.

Fortunately, Adafruit has provided a variety of options to deal with these challenges however you may find some issues you may have to deal with.

Test that the colors and touch locations of the touch screen are consistent with the video and pictures provided.

  • If the screen is not working then you may need to change the screen type in the code to ensure correct operation.
  • If the touch locations are incorrect then row 218 of the code provides test coordinate data which can be used with Row 39 min/max settings for touch accuracy.
  • If the colors are incorrect check they can be changed after row 60 of the code
  • If the orientation of the screen is in portrait then row 105 in code can be adjusted
Read Full Post

About The Author

Scroll to Top
Read previous post:
Particle sensor with LoRa
Particle sensor with LoRa

Particle sensors could be cheap and easy to use. Disadvantage of lowest cost PM sensors is lack of “calibration”. The...