Please welcome a new challenger in the world famous PoppyEducation’s Tic-Tac-Toe contest !
Because an Arduino board only has 6 analogic inputs, I had to consider my 9 photoresistors as digital devices (True/False). So it was quite difficult to adjust the detection level, but a resistor voltage divider bridge did the job.
Behind the scene :
A part of the Snap4Arduino code :
I didn’t mess with the min-max algorithm (maybe I will in a few weeks), I only made the Ergo check the win/loose next position. As you will see, it’s enough to win against my little daughter
To conclude, let’s watch the game !
morpion_v11_good.xml (962.4 KB)