Bop-it Game
Project by Jace Hall and Jesse Duomund
Description
mbed version of Bop-it! game. LCD panel will tell you the action. Buzzer will beep and an external LED will blink to let you know to complete an action.
Actions are:
- Bop-it! (tap the accelerometer)
- Slide-it! (slide the slider to the opposite side)
- Touch 3! (touch three squares on the touch sensor)
If you touch the wrong sensor or fail to complete the required action in time you will fail. You must reset the mbed if you fail to play again!
Equipment
- mbed NXP LPC1768
- Phidgets Slider 60mm
- 8 ohm speaker
- Sparkfun power control Mosfet
- MPR121 Capacitive Touch Sensor break out board
- Text LCD
- ADXL345 Accelerometer
- 2 LEDs
Connections
Remember pullup resistors on I2C lines (4.7k) and external LEDs (1k)
Accel | Slider | mbed | Touch Panel | LCD | Mosfet | Speaker |
---|---|---|---|---|---|---|
SCL | p7 | |||||
SDA | p5 | |||||
SDO | p6 | |||||
INT2 (NULL) | ||||||
INT1 | p11 | |||||
CS | p8 | |||||
DATA | p20 | |||||
GND | GND | GND | GND | GND | System Negative | |
VCC | VCC(+) | VCC | VCC | System Positive | ||
p21 | System C | |||||
Device + | Positive | |||||
Device - | Negative | |||||
p28 | SDA | |||||
p27 | SCL | |||||
p26 | IRQ | |||||
5V | VCC | |||||
GND | GND | |||||
GND via 1k resistor | VO | |||||
p12 | RS | |||||
GND | RW | |||||
p13 | E | |||||
DO(NC) | ||||||
D1(NC) | ||||||
D2(NC) | ||||||
D3 (NC) | ||||||
p14 | D4 | |||||
p15 | D5 | |||||
p16 | D6 | |||||
p17 | D7 | |||||
p29 (external LED 1) | ||||||
p30 (External LED 2) |
Video
Code
Import programLab3_1
Bop-It Game
Issues Encountered
Acc. Use one-axis with the tap function. Using I2C with touch sensor and interrupts can be troublesome. Use a custom IRQ handler and set priorities to get rid of issues. Improve the game by making the IRQ handler!
Please log in to post comments.