Two mbed Agario

Overview

For out project, we used two mbed boards to create a two-player agario game. The first mbed circuit is connected to a uLCD screen and a 5 way tactile switch. The screen is used to display both players positions, and the 5 way switch is for a player to control one of the objects positions. The second mbed board is connected to a speaker and an IMU. The IMU is used to control the position of the second players object, and the speaker emits a sound based on how close you are to the other player. The point of the game is for the second player to find the first player just by the sounds in the speaker, and the first player to dodge the second player by looking at the screen.

TO WATCH A VIDEO CHLICK HERE!

/media/uploads/bfoley13/20151020_151008.jpg

Components

Circuits

mbed1 pinuLCD pin5-way Switch pin
Vout+
p15C
p16U
p17L
p19D
p20R
GNDGND-
VO+5V
p9TX
p10RX
p11RES
mbed2 pinIMU pin
VoutVdd
GNDgnd
p9SDA
p10SCL

For the speaker on the second board, refer this page for setup and use PwmOut p26 on the mbed.

mbed1 pinmbed2 pin
p18p20
p22p23
p23p25
p24p21
p25p24
p26p22

Code

Import libraryTwo mbed Agario

simple game using 2 mbed devices


Please log in to post comments.