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: mbed mbed-rtos SDFileSystem11
Diff: main.cpp
- Revision:
- 3:869a56651e96
- Parent:
- 2:39d41fd0f52b
- Child:
- 4:f14ca9203f62
--- a/main.cpp Mon Apr 26 21:20:36 2021 +0000 +++ b/main.cpp Mon Apr 26 21:28:19 2021 +0000 @@ -110,32 +110,13 @@ } } //ONCE WE REACH THIS POINT ALL PARTS OF THE NOTE OBJECT SHOULD BE SET - float note1 = 1.0/(NOTE_A4*2); - float note2 = 1.0/(NOTE_CS5*2); - float note2m = 1.0/(NOTE_C5*2); - float note3 = 1.0/(NOTE_E5*2); - t.attach(&f, &Flipper::flip, note1); // the address of the object, member function, and interval - t1.attach(&f1, &Flipper::flip, note2); pc.printf("Hello World!\n"); - pc.printf("%f\n",note1); pc.printf("%d", myNote.midiNote); // spin in a main loop. flipper will interrupt it to call flip while(1) { - for(int i = 0; i < 10; i++) { - t1.attach(&f1, &Flipper::flip, note2); led1 = !led1; wait(0.2); - t1.attach(&f1, &Flipper::flip, note3); - wait(0.2); - } - for(int i = 0; i < 10; i++) { - t1.attach(&f1, &Flipper::flip, note2m); - led1 = !led1; - wait(0.2); - t1.attach(&f1, &Flipper::flip, note3); - wait(0.2); - } - + } }