Stock Exchange Game
Project By
Rohan Iyengar, Sai Sathiesh Rajan
Description
A simulation of a stock market was implemented on the MBED micro-controller. This gives the player the opportunity to develop skills to forecast the future in a manner similar to the actual stock market. In this implementation, the overall trend and the day to day trend are incorporated to generate the stock prices for the stock. In addition, a certain amount of volatility is also incorporated into the game. The user will be able to use the touch keypad to advance the game at different stages.
Components Used
- uLCD-144-G2
- 8 Ohm Speaker
- Sparkfun Class D audio amp breakout board
- SparkFun MicroSD Breakout Board
- MPR121 I2C Capacitive Touch Sensor
- ShiftBrite
Pin Setup
Overall Picture
- uLCD-144-G2
Mbed | uLCD Header | uLCD Cable |
---|---|---|
5V=VU | 5V | 5V |
Gnd | Gnd | Gnd |
TX=28 | RX | TX |
RX=27 | TX | RX |
P30 | Reset | Reset |
- Sparkfun Class D audio amp breakout board
Mbed | TPA2005D1 | Speaker |
---|---|---|
Gnd | Pwr-(gnd), in- | |
Vout(3.3V) | Pwr+ | |
p18 (any PWM or D/A) | in+ | |
out+ | + | |
out- | - | |
Any DigitalOut px(optional) | S (low for shutdown) |
- SparkFun MicroSD Breakout Board
Mbed | MicroSD Breakout Board |
---|---|
p8 | CS |
p5 | DI |
Vout | VCC |
p7 | SCK |
Gnd | Gnd |
p6 | DO |
CD |
- MPR121 I2C Capacitive Touch Sensor
Mbed | Touch Keypad | Pullup Resistors |
---|---|---|
p9 | SDA | |
p10 | SCL | 4.7K ohm - from p9/SDA to Vout (not in series!) |
p26 | IRQ | 4.7K ohm - from p10/SCL to Vout (not in series!) |
Vout (3.3V) | VCC |
- ShiftBrite
Mbed | ShiftBrite |
---|---|
Gnd | Gnd |
p11 | DI |
p15 | LI |
p16 | EI |
P13 | CI |
VU(5V) | V+* |
- Note: An external 5-9V DC power supply is needed if you would like to extend this project to 3-4 Shiftbrites
Project Demo
Code
Import programStock_Exchange_Game
A Stock Exchange Game using IO devices, the 128x128 uLCD, and other components
Please log in to post comments.