A memory game created with an ESP32 and MPR121 in the Arduino IDE with C++
- 6 LEDs
- 1 Blue
- 2 Green
- 1 Yellow
- 2 Red
- 6 220Ω Resistors
- 1 MPR121
- 1 ESP32
- Lots of Jumper Wires
- Aluminum Foil or Copper Foil Tape (for touchpads connected to MPR121)
- Uses MPR121 for interactive touch detection
- LEDs for aesthetic feedback
- Touch feedback spam prevention
- Random sequences with
<random>
and<vector>
Download the IDE with this link: https://www.arduino.cc/en/software/
In the IDE, open Files > Preferences > Additional Board Manager URLs and paste this link: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Library Manager > Search Adafruit MPR121 > Install
git clone https://github.com/CookieCodesAI/memory_game_esp32.git
- Tools > Board > Choose Board
- Tools > Port > Choose Port
Click the Upload button to upload code to ESP32
- Based on the sensitivity, users may have to adjust the threshold of the MPR121. Update this line of code based on the sensitivity of MPR121:
cap.setThresholds(0, 0);
- Arduino IDE — https://www.arduino.cc/en/software/
- Arduino-ESP32 Core by Espressif — https://github.com/espressif/arduino-esp32
- Adafruit MPR121 Library — https://github.com/adafruit/Adafruit_MPR121
Setup instructions were based on Arduino IDE, Espressif, and Adafruit MPR121