This project involves using an 8x8 led matrix with the Beaglebone black to play Connect 4. The game is playable using rotary encoders and buttons on the breadboard. The code automatically does 4 in a row detection and will declare a winnerInstallation
1) Ssh into your Beaglebone and ensure it is connected to the internet.
2) Clone the following git repo with:
bone$ git clone https://github.com/craannj/ECE434-connect4.git
If the Adafruit Beaglebone IO Python Library is not already installed, install it with install.sh:
bone$ sudo install.sh
Or install it with these instructions:
bone$ sudo apt-get update
bone$ sudo apt-get install build-essential python3-dev python3-pip -y
bone$ sudo pip3 install Adafruit_BBIO
Once everything is installed you can run the pin configuration and then run the program.
Configure the pins:
Run the program:
bone$ sudo ./connect4final.py
Note: The program has to be run using sudo to allow for I2C to function as intended.Demo
Here is a demo of a game of Connect 4 being played on the Beaglebone.Future Work
In the future I would like to added items such as:
- Added functionality to play the game between two Beaglebones
- Display the score between the two players
- An option to play against a "computer" player
- Interface the game with a webpage
Overall I am happy with how the project turned out. There is one bug that is still present that I have not been able to fix. Otherwise, the game is very simple but functions as intended and has features that I am happy with.