It took 2 weekends and finally the debugging was completed. This is the first time I have tried to write a small game on a microcontroller. The effect is okay, but the screen I am using is a bit too small. It hurts my eyes and makes it difficult to play.
This work mainly completes the Snake mini-game, which is similar to the ones previously played on non-smart phones. The main function is to adjust the speed and control the Snake to eat as many small foods as possible. After reset, the EEWorld picture will be displayed first, then the GigaDevice icon, and finally my own logo. Then it’s time to enter the game. The main interface of the game provides two options: starting the game and speed adjustment. In the speed adjustment, there are nine speeds from 1 to 9 to choose from. The larger the number, the greater the speed. The entire work is designed with only three buttons (one KEY1 on the GD32E231 board and two KEY2 and KEY3 on my stm32 board). In the game, KEY1 can be used to pause the game, and KEY2 and KEY3 are used to control the greedy snake. direction, KEY2 controls the snake to rotate clockwise, and KEY3 controls the snake to rotate in the forward direction.
Blockdiagram
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet