This week my main focus was to work on the validation script as well as the communication script. I worked closely with Mukundh to make sure we figured out a logical approach to writing the programs that will be ran on the RPi. We concluded on a model that is initialized based on a button press from the board, after that our javascript is called to establish connection with Lichess.org, once connection is established, we ask the user to input a move (currently the way moves are inputted are through the terminal – for testing purposes), once a move is entered it is validated on the python script and if the move is valid then we can send it to lichess. The Javascript will serve as a “hub” for communication between the user and lichess. In order to keep track of the current game state, we are passing a FEN string back and forth between the Python script every time a game state update is sent from Lichess. The Javascript sends the current state FEN and the last move made and updates the fen if the move is valid. We have made significant progress on the software side this week, we simply need to fix some minor bugs that are preventing move validation after a few moves.
I also helped test some of the game pieces that Mukundh 3D printed. I made sure that the magnets fit into the pieces and calculated the voltage drop across the LED while varying the distance between the piece and the sensors.
By next week I hope to fix the bugs that are affecting our validation and communication scripts. I also hope to have the scripts running correctly from the RPi. I also hope to have a better understanding of how the arduino will be communicating with the RPi script.