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.
Diff: singsingsing.h
- Revision:
- 1:1de917dde4ed
- Parent:
- 0:943dfa56009a
--- a/singsingsing.h Sat Nov 07 13:40:03 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ -void SingSingSing() -{ - doLedStop = true; - calcBar = 0; - -// Intro - FadeLED(2*4,0,0xFFFFFF,1); - LightLED(16*4,0xFFFFFF,1); - -// A - LightLED(10*4,0x0000FF,1); - LightLED(2*4,0xFF0000,1); - LightLED(4*4,0x0000FF,1); - -// B - LightLED(8*4,0x00FF00,1); - -// C - LightLED(7*4 + 3.66,0xFFFFFF,1); - - LightLED(2,0xFF0000,1); - LightLED(2.33,0x0000FF,1); - LightLED(1.66,0xFF0000,1); - LightLED(2.33 + 1*4+3,0x0000FF,1); - LightLED(1,0x000000,1); - -// D - LightLED(5*4 + 3.66,0x8000FF,1); - LightLED(2*4,0xFF0000,1); - LightLED(0.33 + 4*4,0x8000FF,1); - - LightLED(1.66,0xFF0000,1); - LightLED(2.33,0x0000FF,1); - LightLED(1.66,0xFF0000,1); - LightLED(2,0x0000FF,1); - LightLED(0.33+2*4,0xFF0000,1); - -// E - for (int i = 0; i < BUF; i++) { - if (i < BUF/2) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(2*4,1); - for (int i = 0; i < BUF; i++) { - if (i > BUF/2) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(2*4,1); - LightLED(4*4,0xFFFFFF,1); - -// F - LightLED(16*4,0x00FF00,1); - -// G - for (int j = 0; j < 2; j++) { - for (int i = 0; i < 3; i++) { - LightLED(4,0xFF0000,1); - FadeLED(4,0,0x0000FF,1); - } - FadeLED(2*4,0,0x0000FF,1); - } - -// H - LightLED(8*4,0x00FF00,1); - -// I - for (int j = 0; j < 2; j++) { - for (int i = 0; i < 3; i++) { - LightLED(2,0xFF0000,1); - LightLED(2,0x0000FF,1); - LightLED(1.66,0xFF0000,1); - LightLED(2.33,0x0000FF,1); - } - FadeLED(2*4,0,0x0000FF,1); - } - -// J - for (int j = 0; j < 8; j++) { - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - } - TempoWait(1,1); - } - for (int j = 0; j < 4; j++) { - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFF0000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0xFF0000); - } - TempoWait(1,1); - } - for (int j = 0; j < 4; j++) { - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x00FF00); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x00FF00); - } - TempoWait(1,1); - } - for (int j = 0; j < 4; j++) { - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x0000FF); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x0000FF); - } - TempoWait(1,1); - } - for (int j = 0; j < 8; j++) { - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFF0000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0xFF0000); - } - TempoWait(1,1); - } - -// K - for (int j = 0; j < 11; j++) { - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - } - TempoWait(1,1); - } - for (int i = 0; i < BUF; i++) { - if ((i % 10) >= 0 && (i % 10) <= 4) for (int t = 0; t < 3; t++) tape[t].Write(i,0xFFFFFF); - else for (int t = 0; t < 3; t++) tape[t].Write(i,0x000000); - } - TempoWait(1,1); - LightLED(2,0xFF0000,1); - LightLED(2,0xFFFF00,1); - LightLED(2,0x00FF00,1); - LightLED(2,0x00FFFF,1); - LightLED(1+4*4,0x0000FF,1); - - LightLED(1*4,0x000000,1); - - LightLED(2,0xFF0000,1); - LightLED(2,0x000000,1); - LightLED(2,0xFF0000,1); - LightLED(2,0x000000,1); - - LightLED(5*4,0xFFFFFF,1); - -// End - pc.putc(0xFF); - - - while (1) ; -} \ No newline at end of file