The present code implements a single player squash game, using joystick to move paddle right or left. And checks the current temperature inside the device.
Dependencies: 2645_I2C_TMP102 2645_Physics_Engine_Example Paddle mbed
Revision 4:1d38d6b09e84, committed 2016-05-11
- Comitter:
- bonnyngangu
- Date:
- Wed May 11 14:45:00 2016 +0000
- Parent:
- 3:a30195f90b4e
- Commit message:
- Latest version
Changed in this revision
--- a/2645_I2C_TMP102.lib Mon May 09 09:23:41 2016 +0000 +++ b/2645_I2C_TMP102.lib Wed May 11 14:45:00 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/bonnyngangu/code/2645_I2C_TMP102/#0047b6c36b3e +https://developer.mbed.org/users/bonnyngangu/code/2645_I2C_TMP102/#5d33e4bd4433
--- a/Paddle.lib Mon May 09 09:23:41 2016 +0000 +++ b/Paddle.lib Wed May 11 14:45:00 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/bonnyngangu/code/Paddle/#862da825ba95 +https://developer.mbed.org/users/bonnyngangu/code/Paddle/#603d838c1084
--- a/main.cpp Mon May 09 09:23:41 2016 +0000 +++ b/main.cpp Wed May 11 14:45:00 2016 +0000 @@ -1,24 +1,14 @@ #include "mbed.h" #include "N5110.h" -#include "game.h" +#include "temp.h" #include "main.h" #define BALLRADIUS 2 -// VCC, SCE, RST, D/C, MOSI, SCLK, LED -N5110 lcd (PTE26 , PTA0 , PTC4 , PTD0 , PTD2 , PTD1 , PTC3); -// Can also power (VCC) directly from VOUT (3.3 V) - -// Can give better performance due to current limitation from GPIO pin -InterruptIn interrupt_button(PTB18); // interrupting the sleep mode. -PwmOut buzzer(PTA2); // buzzer connection to PwmOut. -// connections for joystick -DigitalIn button(PTB10); -AnalogIn xPot(PTB2); -AnalogIn yPot(PTB3); void delete_file(char filename[]);