Week 11: November 7th to 13th - ngetachew/Portfolio GitHub Wiki
We started the week off by combining display.py
and hardware.py
, and making improvements to main.py
. I handled the former. Combining the two files didn't take that much work, it was running the file that was the problem. When we ran it on the Linux surface pro, the display came up perfectly. However, when it was ran on the Pi, we got an error message saying "Unable to get a Window, aborting...". Unfortunately, this slowed us down a great deal, because we were unable to test anything involving kivy on the pi. We even went as far as completely purging kivy from the Pi and reinstalling with the hope that it would install the correct libraries. This was not the case. This lead me into a three day long seemingly, never-ending cycle of Googling solutions, uninstalling some package, and then reinstalling.
While troubleshooting with a mentor, we found that the Pi was taking the keyword "python" to mean Python 2.7. For this reason, we had to install everything using Pip install rather than Pip3.
We solved this problem on Tuesday with one of our mentors. After looking in the raspi-config
menu, we found that an important driver from the Graphics Library wasn't installed. A quick internet search showed me how to install it using sudo apt-get
. After this, `display.py was running perfectly. We are now at a point where all we have to do is optimize the kivy code so it runs the way we want it to. We began by changing the dimensions of the grid to be 10x6 instead of 9x9. Our plan for the future is to create a dictionary that will allow us to correlate each grid location with a tuple of 3 elements that correspond to motor positions. I am also working on a function that will allow for a bear to follow the penguin around the game board. I've had to create functions like this in the past for other projects, so this shouldn't be too much of a challenge.