epfl-cs358 / 2024sp-robopong

2 stars 0 forks source link

integrate motors with game flow, screen/button: two player #45

Closed jonathanshu87 closed 4 months ago

jonathanshu87 commented 4 months ago

Currently have a placeholder playGame() function in the game flow code that takes in user input, I plan to replace this function with the motor controller code that we were testing earlier.

jonathanshu87 commented 4 months ago

All the user inputs wired together:

Image

I added a simple if check to determine which mode the players have selected. Since we're trying to get manual two player working, only that mode works and begins reading data from the joysticks:

Image

jonathanshu87 commented 4 months ago

I adjusted the motor control v2 code in order to allow control for both motors. I then helped wire both motors/buttons/screen together in the box and integrated the motor control code into the button game flow code as well ( the code is pushed to github). Both paddles can now be controlled and gameplay is possible.

jonathanshu87 commented 4 months ago

We are currently able to progress through the game flow with the buttons and properly control both joysticks once the game start has been reached. The screen is currently not working, probably due to an address difference between boards. Will need to find address with this code https://drive.google.com/file/d/1WdugBzaDPYoGZcL8e8va2iUM4LuNpKXl/view

edit: screen is now working due to wiring difference