The first step is to download and install the Arduino Integrated Development Environment (IDE) from
. Arduino IDE is a software platform that allows you to write and upload code to the Arduino board.
2. Download Project Resources
Next, you will need to download the project resources from the top of this page. These resources include the code and other files required for the hand gesture game. Once you have downloaded the files, you will need to unzip them.
Inside the unzipped files, there is a "memory" folder that contains the main code file for the hand gesture game. Open the "memory" file using Arduino IDE.
4. Download the library for OLED Display
The OLED display is a component that will be used in the hand gesture game. You will need to download the appropriate library for the OLED display to be able to use it with the Arduino board. There are several OLED libraries available, but we recommend using “U8g2” for this project. You can download this.
Library in Arduino IDE via the Library Manager (Sketch > Include Library > Manage Libraries) The gesture sensor library is already included in the project resources folder, so you don't need to worry about downloading it separately.
5. Select the Right Board and Port:
Before you can upload the code to the Arduino board, you need to make sure that the correct board and port are selected in the Arduino IDE. To do this, go to the "Tools" menu in Arduino IDE and select the appropriate board and port.
6. Verify and Upload the code
Once the board and port are selected, you can click on the "Verify" button in the Arduino IDE to check if the code is correct. If there are no errors, you can then click on the "Upload" button to upload the code to the board.
Congratulations! You have now successfully created your very own hand gesture game. You can now play the game by following the instructions provided with the game.
Adding more levels is easy; it's all added into the levels.h file
1 // this must be const, this must have a unique name (such as "level3" )
2 // and it must have PROGMEM before the equal sign to store it in flash
3 const uint8_t level3[] PROGMEM = {
4 GES_RIGHT_FLAG, //these are defined in paj7620.h, link them
5 GES_LEFT_FLAG,
6 GES_UP_FLAG,
7 GES_LEFT_FLAG,
8 GES_UP_FLAG,
9 GES_CLOCKWISE_FLAG,
10 FINISHED}; //you must end it with FINISHED, or a null byte
The position of the level will indicate how fast it goes; further down the list will be faster.
1 const uint8_t *const levels[TOTAL_LEVELS] PROGMEM = {
2 level1,
3 level2,
4 level3,
5 /* TODO, your level here */
6 level4,
7 level5};
This will allow all levels to be referenced
1 //at the top of the file
2 #include "paj7620.h"
3 #define FINISHED 0
4 #define TOTAL_LEVELS 5 //increase this to be the number of levels in the levels array
Use the instructions from our
project to generate a new title screen.