In summay, our project is a mini game which takes sound input to control the moving of a character to dodge moving objects.
The code logic works as following: The LED matrix will be light up and set to stable mode (not blinking) at beginning. The I2C write buffer is constantly rewritten to chose which row and which of the eight lights to light up in each row. The I2C master device will send these buffer to the slave address of the LED matrix to change the pattern on the LED matrix. At the end of each frame, the audio codec UDA1380, with an amplitude buffer, would be enabled in the NVIC and check for user sound inputs to decide if the character would jump in the next frame. If the character fail to jump over the moving object, the game will end and a end screen will show up until the button is pushed to trigger the interrupt to restart the game.
The challenges we faced were try to figure out how to control the lights to get certain pattern for the LED. We learned that it is essential to get the correct information from the data sheet We also learned how to convert the code designed for other platform to our platform. We also got more knowledge on how I2C and I2S interfaces work and how to configure multiple I2C devices to work together.
The code logic works as following: The LED matrix will be light up and set to stable mode (not blinking) at beginning. The I2C write buffer is constantly rewritten to chose which row and which of the eight lights to light up in each row. The I2C master device will send these buffer to the slave address of the LED matrix to change the pattern on the LED matrix. At the end of each frame, the audio codec UDA1380, with an amplitude buffer, would be enabled in the NVIC and check for user sound inputs to decide if the character would jump in the next frame. If the character fail to jump over the moving object, the game will end and a end screen will show up until the button is pushed to trigger the interrupt to restart the game.
The challenges we faced were try to figure out how to control the lights to get certain pattern for the LED. We learned that it is essential to get the correct information from the data sheet We also learned how to convert the code designed for other platform to our platform. We also got more knowledge on how I2C and I2S interfaces work and how to configure multiple I2C devices to work together.