“A 4x4 Tic-Tac-Toe game using a 4x4 touch pad and a ATtiny3216 CPU
A while back I built my Touch-A-Mole game which is a version of Whack-A-Mole game that uses a 4x4 capacitive touch pad with LEDs mounted in the middle of each touch pad. As I was building it, I thought that if I replaced the single color LEDs with bi-color LEDs, I could turn it into a version of Tic-Tac-Toe.
I choose to use a ATtiny3216 microprocessor as the brains of the game. It has sufficient pins to control the LEDs, buttons and speaker. It can run at 20MHz and has 32k of Flash and 2k of RAM.
The bi-color LEDs are common cathode and the anodes are connected in columns and via a current limiting resistor to a pin on the ATtiny3216. The cathodes are connected in rows and are enabled by a transistor which is controlled by the ATtiny3216.
The 4x4 capacitive touch switch panel is controlled by two signal wires. While the PCB sometimes labels these pins SCL and SDA, it doesn’t use the I2C protocol. They are really just the clock pin and data pin and they use a proprietary two wire protocol.
I designed a PCB to hold the LEDs and surface mount components. The Eagle files have been included should you wish to get the board commercially made or you can make it yourself. I used the Toner method to make mine.
Start by adding the SMD components. I find it easier to use solder paste rather than use solder from a reel when soldering SMD components.
Add the links if your board is single sided.”