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!
Components
- mbed x2
- LMS9DS0-IMU
- 5-way tactile joystick
- uLCD
- speaker
Circuits
mbed1 pin | uLCD pin | 5-way Switch pin |
---|---|---|
Vout | + | |
p15 | C | |
p16 | U | |
p17 | L | |
p19 | D | |
p20 | R | |
GND | GND | - |
VO | +5V | |
p9 | TX | |
p10 | RX | |
p11 | RES |
mbed2 pin | IMU pin |
---|---|
Vout | Vdd |
GND | gnd |
p9 | SDA |
p10 | SCL |
For the speaker on the second board, refer this page for setup and use PwmOut p26 on the mbed.
mbed1 pin | mbed2 pin |
---|---|
p18 | p20 |
p22 | p23 |
p23 | p25 |
p24 | p21 |
p25 | p24 |
p26 | p22 |
Code
Import libraryTwo mbed Agario
simple game using 2 mbed devices
Please log in to post comments.