One player pong with seven segment display for score keeping

Dependencies:   4DGL-uLCD-SE PinDetect SDFileSystem mbed-rtos mbed wave_player

Fork of ECE2036Lab2StarterCode by Joseph Lind

Committer:
dcleary
Date:
Thu Mar 17 20:38:26 2016 +0000
Revision:
3:c93d1b51785c
Parent:
1:839d22d423bd
Pong

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dcleary 3:c93d1b51785c 1 #ifndef TEMPMODULE_H
dcleary 3:c93d1b51785c 2 #define TEMPMODULE_H
dcleary 3:c93d1b51785c 3 #include "mbed.h"
jlind6 0:356124c0bafc 4 #include "uLCD_4DGL.h"
jlind6 0:356124c0bafc 5
jlind6 0:356124c0bafc 6 class TempModule
jlind6 0:356124c0bafc 7 {
jlind6 0:356124c0bafc 8 public:
jlind6 0:356124c0bafc 9 // Constructors
jlind6 0:356124c0bafc 10 TempModule(PinName pin);
jlind6 0:356124c0bafc 11 TempModule(PinName pin, float vx, float vy);
jlind6 0:356124c0bafc 12 // Reading temperature values
jlind6 0:356124c0bafc 13 float read();
jlind6 0:356124c0bafc 14 // Set Functions
jlind6 0:356124c0bafc 15 void setBaseVx(float); // This sets the lowest velocity of vx
jlind6 0:356124c0bafc 16 void setBaseVy(float); // This sets the lowest velocity of vy
jlind6 0:356124c0bafc 17 // Get Functions/Member Functions
jlind6 0:356124c0bafc 18 float getVx(); // Calculates a speed based off of the temp
jlind6 0:356124c0bafc 19 float getVy();
jlind6 0:356124c0bafc 20 float getVx(uLCD_4DGL *); // Same thing as getVx(), except it
jlind6 0:356124c0bafc 21 // also writes the temp to the screen.
jlind6 0:356124c0bafc 22
jlind6 0:356124c0bafc 23 private:
jlind6 0:356124c0bafc 24 // Data members are suggestions, feel free to add/remove
jlind6 0:356124c0bafc 25 AnalogIn _sensor;
jlind6 0:356124c0bafc 26 float roomTemp;
jlind6 0:356124c0bafc 27 float holdTemp;
jlind6 0:356124c0bafc 28 float basevx;
jlind6 0:356124c0bafc 29 float basevy;
jlind6 0:356124c0bafc 30 int counter;
jlind6 0:356124c0bafc 31 };
dcleary 3:c93d1b51785c 32 #endif