ChessLR. Me and Rob got together to talk about the electronic chess board today. He showed a proof of concept using reed switches, a magnet, and an LED. Man that was cool. The reed switch is amazingly sensitive to the magnetic field of a magnet. I was able to hold the magnet about 3cm away and the reed switch was still able to sense it. I did find that there was a bit of a dead zone in the middle of the switch, which could prove problematic. But no problems reading it through a piece of wood.
After inspecting how the switches were wired up, I think I know enough to setup my own prototype board. I snagged enough switches from Rob to make a 3x3 board to test for myself.
I wrote some prototype code that would simulate the eboard, how it would interface with whatever software we would be using. In this case it was a board displaying the game pieces.
I was able to make it so you can toggle the state of a square on the sim board, which was then picked up by the game board. By knowing what piece was on a square, the game board was able to allow you to pick up a piece, and drop it on another square. It was even able to sense when you were capturing a piece by sensing that you picked up the first piece, the piece you were capturing, then putting your piece down on the board. It didn't enforce any rules.
Copyright © 2020, Lee Patterson