Mbed Tap Reborn
Description
This project is a simulation of the Tap Reborn game seen in mobile app stores. A preset array of notes was generated to be used for comparison with the corresponding push button pressed. If the correct push button was pressed at the time the corresponding circle arrived at the bottom of the screen, then the RGB LED turns green. However, if the incorrect button or no buttons was pressed, then the RGB LED remains red. The Bluefruit app was used to select the song to play with the Mbed Tap Reborn game. Once the user selected a song, the corresponding array of notes was loaded from the SD card. In order to facilitate user interaction, appropriate states and their prompts were used, such as prompting the user to decide between resetting or quitting the game when the game ends.
Available on iTunes: https://itunes.apple.com/us/app/tap-reborn/id993082611?mt=8
Available on Google Play Store: https://play.google.com/store/apps/details?id=com.musicrage.tr&hl=en_US
Instructions
The Bluefruit app is downloaded, available both on iTunes and on Google Play Store. After connecting the mbed to the computer, the Bluefruit app is to be used to connect to the Bluetooth chip after enabling Bluetooth connection on the mobile device. The uLCD will prompt for selecting the song to be played. Thus, the appropriate song is selected by entering the corresponding number on the text field in the Bluefruit app. When the game starts, the circles will start to drop from the top of the screen to bottom. The circles are to be hit with the corresponding push buttons. After 50 circles of playing, the song will freeze and the number and the percentage of the correct taps will appear. Also, a prompt will appear to either quit the game or replay the game.
Bluefruit available on iTunes: https://itunes.apple.com/us/app/adafruit-bluefruit-le-connect/id830125974?mt=8
Bluefruit available on Google Play Store: https://play.google.com/store/apps/details?id=com.adafruit.bluefruit.le.connect&hl=en_US
Code
Import programMbedTapReborn
Final Game. Have fun!!! :-)
SD Card Files
Each name of the four .wav files should be exactly as portrayed on the uLCD, with the number and period omitted and a .wav extension attached. Furthermore, the same should be for each of the four .txt files, however, with a .txt extension. The audio files should be mono with the project rate to be 11025 Hz. Each text file should be an array of 300 integers between 1 and 4 inclusive, which each integer on a separate line.
Hardware Schematic
Hardware Setup
Adafruit Bluefruit UART
mbed | Bluetooth |
---|---|
P28 | RXI |
P27 | TXO |
VU | VIN |
GND | CTS |
GND | GND |
TPA2005D1 Class D Audio Amp
mbed | TPA2005D1 | 5 V External Supply | Speaker |
---|---|---|---|
P26 | IN+ | ||
GND | IN- | - | |
GND | PWR- | - | |
PWR+ | + | ||
OUT+ | + | ||
OUT- | - | ||
S |
MicroSD Breakout
mbed | MicroSD Breakout |
---|---|
P8 | CS |
P5 | DI |
VOUT | VCC |
P7 | SCK |
GND | GND |
P6 | DO |
CD |
Smart Color LCD
mbed | uLCD cable |
---|---|
VU | 5V |
P13 | TX |
P14 | RX |
GND | GND |
P12 | RES |
RGB LED
mbed | LED |
---|---|
P19 | P1 |
GND | P2 |
P20 | P3 |
P4 |
Note
The push buttons are internally pulled up. They each connect directly to a red LED and to pins 21, 22, 23, and 24 on the mbed.
Demo Video
Please log in to post comments.