// SPDX-FileCopyrightText: 2018 Phillip Burgess for Adafruit Industries // // SPDX-License-Identifier: MIT // These are the messages that are randomly selected for a "spirit reading" // by touching Hallowing's capacitive touch pads. Only letters A-Z and // numbers 0-9 are supported. Space character introduces a brief pause // (this is why the example phrases all have a finishing space, so it holds // for a moment at the end of the reading). Additionally, the "\x4\x5" at // the end of some messages tells it to scroll to the left and right ends // of "GOOD BYE" on the board. Other points one can focus on: // \x1 "YES" // \x2 "NO" // \x3 "GOOD BYE" center // \x4 "GOOD BYE" left // \x5 "GOOD BYE" right // \x6 "SPIRIT BOARD" center const char *messages[] = { "BOO ", "HAPPY HALLOWEEN \x4\x5", "TRICK OR TREAT ", "SMELL MY FEET \x4\x5", "STAY OFF THE MOORS \x4\x5", "NEEDS MORE DRAGONS \x4\x5", "BE AFRAID ", "BE VERY AFRAID \x4\x5", "SPOOPY ", "HE DID THE MONSTER MASH \x4\x5", "LET THE WILD RUMPUS START \x4\x5", "TIS NOW THE WITCHING TIME \x4\x5", "AWOOOO ", "NEVERMORE \x4\x5", "TRUST NO ONE \x4\x5", "\x1 ", // "YES" and pause "\x2 ", // "NO" and pause }; #define NUM_MESSAGES (sizeof messages / sizeof messages[0]) // This table has the center(ish) coordinates for each letter and number on // the spirit board graphic. This was manually generated by eyeballing the // center of each letter and reading the cursor coordinates in Photoshop. struct { int16_t x; int16_t y; } coord[] = { { 76, 253 }, // A coord[] index 0 { 122, 223 }, // B { 181, 199 }, // C { 235, 184 }, // D { 294, 172 }, // E { 340, 168 }, // F { 399, 166 }, // G { 461, 168 }, // H { 513, 175 }, // I { 546, 185 }, // J { 594, 195 }, // K { 644, 214 }, // L { 702, 241 }, // M { 69, 345 }, // N { 121, 312 }, // O { 171, 288 }, // P { 226, 269 }, // Q { 283, 255 }, // R { 332, 248 }, // S { 382, 243 }, // T { 441, 246 }, // U { 500, 253 }, // V { 566, 271 }, // W { 629, 295 }, // X { 679, 320 }, // Y { 721, 348 }, // Z coord[] index 25 { 612, 376 }, // 0 26 { 175, 376 }, // 1 { 221, 376 }, // 2 { 270, 376 }, // 3 { 323, 376 }, // 4 { 370, 376 }, // 5 { 420, 376 }, // 6 { 467, 376 }, // 7 { 512, 376 }, // 8 { 561, 376 }, // 9 35 { 222, 99 }, // YES 36 { 567, 99 }, // NO { 395, 471 }, // GOOD BYE center { 315, 471 }, // GOOD BYE left { 484, 471 }, // GOOD BYE right { 395, 63 } // SPIRIT BOARD center 41 };