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

  1. uLCD-144-G2
  2. 8 Ohm Speaker
  3. Sparkfun Class D audio amp breakout board
  4. SparkFun MicroSD Breakout Board
  5. MPR121 I2C Capacitive Touch Sensor
  6. ShiftBrite

Pin Setup

Overall Picture /media/uploads/RohanIyengar/lab4_overall.jpg

  • uLCD-144-G2
MbeduLCD HeaderuLCD Cable
5V=VU5V5V
GndGndGnd
TX=28RXTX
RX=27TXRX
P30ResetReset
  • Sparkfun Class D audio amp breakout board
MbedTPA2005D1Speaker
GndPwr-(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
MbedMicroSD Breakout Board
p8CS
p5DI
VoutVCC
p7SCK
GndGnd
p6DO
CD
  • MPR121 I2C Capacitive Touch Sensor
MbedTouch KeypadPullup Resistors
p9SDA
p10SCL4.7K ohm - from p9/SDA to Vout (not in series!)
p26IRQ4.7K ohm - from p10/SCL to Vout (not in series!)
Vout (3.3V)VCC
  • ShiftBrite
MbedShiftBrite
GndGnd
p11DI
p15LI
p16EI
P13CI
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.