From: Russ Handorf Date: Fri, 12 Jun 2020 03:41:38 +0000 (-0400) Subject: foist X-Git-Url: http://russells-world.com/code/?a=commitdiff_plain;h=47cb0d5d8ba6a4c54943d9a8b25da74472cdcda7;p=hack-covid-19.git foist --- 47cb0d5d8ba6a4c54943d9a8b25da74472cdcda7 diff --git a/covid.ino b/covid.ino new file mode 100644 index 0000000..8c3c699 --- /dev/null +++ b/covid.ino @@ -0,0 +1,318 @@ +//USBtinyISP(ATTinyCore) upload using programmer +//Atinny841(Optiboot) +#include + +const int ROW_1 = 10; //LED row 1 +const int ROW_2 = 9; //LED row 2 +const int ROW_3 = 8; //LED row 3 +const int ROW_4 = 7; +const int ROW_5 = 3; + +unsigned long next; + +const static char spike[] PROGMEM = "auguuuguuuuucuuguuuuauugccacuagucucuagucaguguguuaaucuuacaaccagaacucaauuacccccugcauacacuaauucuuucacacgugguguuuauuacccugacaaaguuuucagauccucaguuuuacauucaacucaggacuuguucuuaccuuucuuuuccaauguuacuugguuccaugcuauacaugucucugggaccaaugguacuaagagguuugauaacccuguccuaccauuuaaugaugguguuuauuuugcuuccacugagaagucuaacauaauaagaggcuggauuuuugguacuacuuuagauucgaagacccagucccuacuuauuguuaauaacgcuacuaauguuguuauuaaagucugugaauuucaauuuuguaaugauccauuuuuggguguuuauuaccacaaaaacaacaaaaguuggauggaaagugaguucagaguuuauucuagugcgaauaauugcacuuuugaauaugucucucagccuuuucuuauggaccuugaaggaaaacaggguaauuucaaaaaucuuagggaauuuguguuuaagaauauugaugguuauuuuaaaauauauucuaagcacacgccuauuaauuuagugcgugaucucccucaggguuuuucggcuuuagaaccauugguagauuugccaauagguauuaacaucacuagguuucaaacuuuacuugcuuuacauagaaguuauuugacuccuggugauucuucuucagguuggacagcuggugcugcagcuuauuauguggguuaucuucaaccuaggacuuuucuauuaaaauauaaugaaaauggaaccauuacagaugcuguagacugugcacuugacccucucucagaaacaaaguguacguugaaauccuucacuguagaaaaaggaaucuaucaaacuucuaacuuuagaguccaaccaacagaaucuauuguuagauuuccuaauauuacaaacuugugcccuuuuggugaaguuuuuaacgccaccagauuugcaucuguuuaugcuuggaacaggaagagaaucagcaacuguguugcugauuauucuguccuauauaauuccgcaucauuuuccacuuuuaaguguuauggagugucuccuacuaaauuaaaugaucucugcuuuacuaaugucuaugcagauucauuuguaauuagaggugaugaagucagacaaaucgcuccagggcaaacuggaaagauugcugauuauaauuauaaauuaccagaugauuuuacaggcugcguuauagcuuggaauucuaacaaucuugauucuaagguuggugguaauuauaauuaccuguauagauuguuuaggaagucuaaucucaaaccuuuugagagagauauuucaacugaaaucuaucaggccgguagcacaccuuguaaugguguugaagguuuuaauuguuacuuuccuuuacaaucauaugguuuccaacccacuaaugguguugguuaccaaccauacagaguaguaguacuuucuuuugaacuucuacaugcaccagcaacuguuuguggaccuaaaaagucuacuaauuugguuaaaaacaaaugugucaauuucaacuucaaugguuuaacaggcacagguguucuuacugagucuaacaaaaaguuucugccuuuccaacaauuuggcagagacauugcugacacuacugaugcuguccgugauccacagacacuugagauucuugacauuacaccauguucuuuugguggugucaguguuauaacaccaggaacaaauacuucuaaccagguugcuguucuuuaucaggauguuaacugcacagaagucccuguugcuauucaugcagaucaacuuacuccuacuuggcguguuuauucuacagguucuaauguuuuucaaacacgugcaggcuguuuaauaggggcugaacaugucaacaacucauaugagugugacauacccauuggugcagguauaugcgcuaguuaucagacucagacuaauucuccucggcgggcacguaguguagcuagucaauccaucauugccuacacuaugucacuuggugcagaaaauucaguugcuuacucuaauaacucuauugccauacccacaaauuuuacuauuaguguuaccacagaaauucuaccagugucuaugaccaagacaucaguagauuguacaauguacauuuguggugauucaacugaaugcagcaaucuuuuguugcaauauggcaguuuuuguacacaauuaaaccgugcuuuaacuggaauagcuguugaacaagacaaaaacacccaagaaguuuuugcacaagucaaacaaauuuacaaaacaccaccaauuaaagauuuuggugguuuuaauuuuucacaaauauuaccagauccaucaaaaccaagcaagaggucauuuauugaagaucuacuuuucaacaaagugacacuugcagaugcuggcuucaucaaacaauauggugauugccuuggugauauugcugcuagagaccucauuugugcacaaaaguuuaacggccuuacuguuuugccaccuuugcucacagaugaaaugauugcucaauacacuucugcacuguuagcggguacaaucacuucugguuggaccuuuggugcaggugcugcauuacaaauaccauuugcuaugcaaauggcuuauagguuuaaugguauuggaguuacacagaauguucucuaugagaaccaaaaauugauugccaaccaauuuaauagugcuauuggcaaaauucaagacucacuuucuuccacagcaagugcacuuggaaaacuucaagauguggucaaccaaaaugcacaagcuuuaaacacgcuuguuaaacaacuuagcuccaauuuuggugcaauuucaaguguuuuaaaugauauccuuucacgucuugacaaaguugaggcugaagugcaaauugauagguugaucacaggcagacuucaaaguuugcagacauaugugacucaacaauuaauuagagcugcagaaaucagagcuucugcuaaucuugcugcuacuaaaaugucagaguguguacuuggacaaucaaaaagaguugauuuuuguggaaagggcuaucaucuuauguccuucccucagucagcaccucaugguguagucuucuugcaugugacuuaugucccugcacaagaaaagaacuucacaacugcuccugccauuugucaugauggaaaagcacacuuuccucgugaaggugucuuuguuucaaauggcacacacugguuuguaacacaaaggaauuuuuaugaaccacaaaucauuacuacagacaacacauuugugucugguaacugugauguuguaauaggaauugucaacaacacaguuuaugauccuuugcaaccugaauuagacucauucaaggaggaguuagauaaauauuuuaagaaucauacaucaccagauguugauuuaggugacaucucuggcauuaaugcuucaguuguaaacauucaaaaagaaauugaccgccucaaugagguugccaagaauuuaaaugaaucucucaucgaucuccaagaacuuggaaaguaugagcaguauauaaaauggccaugguacauuuggcuagguuuuauagcuggcuugauugccauaguaauggugacaauuaugcuuugcuguaugaccaguugcuguaguugucucaagggcuguuguucuuguggauccugcugcaaauuugaugaagacgacucugagccagugcucaaaggagucaaauuacauuacacauaaacgaacuu\N"; + + +//augc + +// the setup function runs once when you press reset or power the board +void setup() { + next = millis() + 5000; +} + +// the loop function runs over and over again forever +void loop() { + if (((signed long)(millis() - next)) > 0) { + sparkle(); + spin(); + spin3(); + seq(); + turnoff(); + next = millis() + random(1000,5000); + } +} + +void turnoff() { + pinMode(ROW_1, INPUT); + pinMode(ROW_2, INPUT); + pinMode(ROW_3, INPUT); + pinMode(ROW_4, INPUT); + pinMode(ROW_5, INPUT); +} + +void sparkle() { + turnoff(); + for (int i=0; i<5; i++) { + led13(); + delay(15*i); + led14(); + delay(15*i); + //15 being wonky + led15(); + delay(15*i); + led16(); + delay(15*i); + led17(); + delay(15*i); + led18(); + delay(15*i); + } +} + +void seq() { + //int i=0; + char c; + //while((c = pgm_read_byte(str++))) { + for (int i=0; i