Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FFT
Revision 11:951bbb0385aa, committed 2020-12-04
- Comitter:
- dimitryjl23
- Date:
- Fri Dec 04 18:01:22 2020 +0000
- Parent:
- 10:a259a4a70210
- Commit message:
- Final :)
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Dec 04 17:17:17 2020 +0000
+++ b/main.cpp Fri Dec 04 18:01:22 2020 +0000
@@ -16,7 +16,9 @@
Adafruit_8x8matrix matrix = Adafruit_8x8matrix(&i2c);
AnalogOut DACout(p18); // speaker
+//PwmOut speaker(p21);
wave_player waver(&DACout);
+//wave_player waver(speaker);
Mutex speaker_lock;
Mutex file_lock;
DigitalOut myled(LED1); // mbed LED
@@ -290,20 +292,18 @@
int main()
{
- //sd.mount();
- pc.printf("I have updated\n");
+ //starting thread
Thread th1(speaker_thread);
Thread th2(display_thread);
+
+
char c;
while(1) {
- /*myled = 1;
- wait(0.2);
- myled = 0;
- wait(0.2);
- */
while(!pc.readable()) {
Thread::wait(1);
}
+
+ //selects the song
if (pc.getc() == '!') {
c = pc.getc();
switch(c) {