Please click on the image to acces to our Mechanical & Machine Desgin
I was in charge of designing and programming the
For the interface we tried to use Pygame, but it has some problems to define a grid, so we moved to KIVY, an open source library used to design interfaces. It allows you to work with grids, wich made things a little bit easier This interface works with a 8x8 matrix made of buttons. Each one has a color that changes every time you clic on it. We have chose 7 possible colors and defined them on an array and assigned a code for each one. We have indexed all the buttons with a code from 0 to 63. It also has a Reset button, that returns every button to its original state. Finally, it has a Send button. This is where the magic happens. The Send button uses serial communication to interact with the Arduino. It searches through the Matrix and if a button has a different color than the original (white), it sends a string with the position and the code of color of the button. It sends it using the following way: "M" + row (from 0 to 7)+ column (from 0 to 7) + "L" + color code (10, 20, .... 70) + ";".
Kivy has several libraries andcan work with windows, android, etc.
Kivi: Code← Previous Assignment → Next Assignment