Chapter 6 Tetris
In this chapter, we prepare a tetris game for you. You can play the game by pressing the buttons.
Project 6.1 Tetris
Now, let’s use Processing and ESP32 board to achieve the tetris game.
Component list
ESP32-WROVER x1
|
GPIO Extension Board x1
|
||
Breadboard x1
|
|||
Jumper M/M x4
|
Resistor 10kΩ x4
|
Push button x4
|
|
Circuit
Use Pin4, Pin5, Pin18, Pin19 port on ESP32 board to control the movement of the block.
Schematic diagram |
|
Hardware connection |
|
Sketch
Sketch Tetris
Use Processing to open Tetris.pde and click Run. If the connection succeeds, the follow will be shown:
Now you can try using the buttons to control the falling block. Press the space bar to pause the game.
When the game is over, you can press the space bar to play the game again. Press ESC to exit the game.







