Two player imu pong

Dependencies:   4DGL-uLCD-SE IMUfilter LSM9DS0 PinDetect mbed

Committer:
rrr93
Date:
Thu Oct 22 16:50:22 2015 +0000
Revision:
0:941225f01ccc
qewrt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rrr93 0:941225f01ccc 1 #include "Speaker.h"
rrr93 0:941225f01ccc 2
rrr93 0:941225f01ccc 3 class Note
rrr93 0:941225f01ccc 4 {
rrr93 0:941225f01ccc 5 public:
rrr93 0:941225f01ccc 6 Note();
rrr93 0:941225f01ccc 7 Note(float, float, float);
rrr93 0:941225f01ccc 8 float getFreq();
rrr93 0:941225f01ccc 9 float getLength();
rrr93 0:941225f01ccc 10 float getVol();
rrr93 0:941225f01ccc 11 // You create your own constructors and
rrr93 0:941225f01ccc 12 // member functions!!
rrr93 0:941225f01ccc 13 private:
rrr93 0:941225f01ccc 14 float freq;
rrr93 0:941225f01ccc 15 float length;
rrr93 0:941225f01ccc 16 float volume;
rrr93 0:941225f01ccc 17 };
rrr93 0:941225f01ccc 18
rrr93 0:941225f01ccc 19 class SoundBuilder
rrr93 0:941225f01ccc 20 {
rrr93 0:941225f01ccc 21 public:
rrr93 0:941225f01ccc 22 SoundBuilder();
rrr93 0:941225f01ccc 23 SoundBuilder(Speaker *);
rrr93 0:941225f01ccc 24 void addNote(Note);
rrr93 0:941225f01ccc 25 void playSong();
rrr93 0:941225f01ccc 26 // Set Sounds
rrr93 0:941225f01ccc 27 // Set Songs
rrr93 0:941225f01ccc 28 // Play Sounds
rrr93 0:941225f01ccc 29 // Play Songs
rrr93 0:941225f01ccc 30 // Clear Songs
rrr93 0:941225f01ccc 31
rrr93 0:941225f01ccc 32 private:
rrr93 0:941225f01ccc 33 Note song[20];
rrr93 0:941225f01ccc 34 Speaker *speaker;
rrr93 0:941225f01ccc 35 int ind;
rrr93 0:941225f01ccc 36 };