From e9b80595bb97cccc48760ba43538d5464d035283 Mon Sep 17 00:00:00 2001 From: kokoscript Date: Wed, 18 Nov 2020 04:27:03 -0600 Subject: [PATCH] finalize mk1 --- anims.h | 73 +++++++++++++++++++++++++++++++++++ bitmapData.h | 36 ++++++++--------- chained_bmp/boot1.png | Bin 451 -> 452 bytes chained_bmp/info_chained.png | Bin 568 -> 571 bytes chained_bmp/no1_chained.png | Bin 349 -> 347 bytes chained_bmp/no2_chained.png | Bin 353 -> 351 bytes chained_bmp/no4_chained.png | Bin 353 -> 357 bytes chained_bmp/no5_chained.png | Bin 349 -> 350 bytes digitsune.h | 17 +++++++- digitsune.ino | 47 ++++++++++++++++++++-- sfx.h | 18 ++++----- 11 files changed, 159 insertions(+), 32 deletions(-) diff --git a/anims.h b/anims.h index 9b809b6..e95b5b8 100644 --- a/anims.h +++ b/anims.h @@ -170,3 +170,76 @@ void emotePensive() { } } } + +void emoteYes() { + mode = DISP_MODE_EMOTEYES; + for(int i = 0; i < 13; i++){ + switch(i){ + case 0: + case 4: + case 8: + case 12: + display_bitmap(1); + if(i == 0 || i == 4 || i == 8) ynSnd1(); + break; + case 1: + case 3: + case 5: + case 7: + case 9: + case 11: + display_bitmap_delay(26, 80); + break; + case 2: + case 6: + case 10: + display_bitmap(27); + ynSnd2(); + break; + default: + display_bitmap_delay(0, 100); + break; + } + } +} + + +void emoteNo() { + mode = DISP_MODE_EMOTENO; + for(int i = 0; i < 17; i++){ + switch(i){ + case 0: + case 4: + case 8: + case 12: + case 16: + display_bitmap_delay(30, 50); + break; + case 1: + case 3: + case 9: + case 11: + display_bitmap_delay(29, 50); + break; + case 2: + case 10: + display_bitmap(28); + ynSnd2(); + break; + case 5: + case 7: + case 13: + case 15: + display_bitmap_delay(31, 50); + break; + case 6: + case 14: + display_bitmap_delay(32, 50); + ynSnd1(); + break; + default: + display_bitmap_delay(0, 100); + break; + } + } +} diff --git a/bitmapData.h b/bitmapData.h index 23a9e76..5435fd9 100644 --- a/bitmapData.h +++ b/bitmapData.h @@ -2,16 +2,16 @@ const unsigned char bmpDat[][168] PROGMEM = { { // 0 boot 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x18, 0x18, 0x38, 0x30, 0x31, 0x01, 0x01, 0x00, 0x00, 0x18, 0x1c, 0x0e, 0x06, 0x07, 0x03, 0x03, - 0x03, 0x7f, 0x7f, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x28, 0x57, 0x57, 0x00, 0x1f, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x63, 0x63, 0x63, 0x63, 0x60, 0x70, - 0x30, 0x38, 0x1c, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x66, 0x6e, 0x7c, 0x7c, 0x6e, 0x66, 0x00, 0x00, - 0x42, 0x5a, 0x7e, 0x7e, 0x66, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xf8, 0xc0, 0x00, 0x3c, - 0xfc, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x00, 0x00, - 0xc0, 0xfc, 0xbc, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x9c, 0xbc, 0xd8, - 0xe0, 0x70, 0x38, 0xf8, 0xf8, 0x80, 0x80, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x38, 0x1c, 0x0c, 0x0e, - 0x06, 0x06, 0x86, 0x80, 0x0a, 0x0a, 0x14, 0x00 + 0x18, 0x18, 0x38, 0x30, 0x31, 0x01, 0x01, 0x00, 0x00, 0x18, 0x1c, 0x0e, 0x06, 0x07, 0x03, 0x03, + 0x03, 0x7f, 0x7f, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x28, 0x57, 0x57, 0x00, 0x1f, 0x1f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x63, 0x63, 0x63, 0x63, 0x60, + 0x70, 0x30, 0x38, 0x1c, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x66, 0x6e, 0x7c, 0x7c, 0x6e, 0x66, 0x00, + 0x00, 0x42, 0x5a, 0x7e, 0x7e, 0x66, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xf8, 0xc0, 0x00, 0x3c, + 0xfc, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x00, 0x00, + 0xc0, 0xfc, 0xbc, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x9c, 0xbc, 0xd8, + 0xe0, 0x70, 0x38, 0xf8, 0xf8, 0x80, 0x80, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x38, 0x1c, 0x0c, 0x0e, + 0x06, 0x06, 0x86, 0x80, 0x0a, 0x0a, 0x14, 0x00 }, { // 1 main, yes1 @@ -126,13 +126,13 @@ const unsigned char bmpDat[][168] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, { // 9 infoscreen - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xb5, 0xb7, 0x94, 0x62, 0x00, + 0x2b, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x84, 0xb5, 0xb7, 0x94, 0x62, 0x00, 0x78, 0x3c, 0x7e, 0x7f, 0x6f, 0x46, 0x00, 0x00, 0x00, 0xa4, 0xaa, 0xca, 0xa4, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc9, 0xaa, 0xaa, 0xa1, 0xc8, 0x24, 0x71, 0x25, 0x25, 0x45, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x25, 0x53, 0x55, 0x25, 0x00, 0x00, 0x00, 0x01, 0xa8, 0x01, 0xc0, 0x80, 0x00, - 0x00, 0x00, 0x29, 0x92, 0x92, 0x29, 0x00, 0x80, 0x80, 0x40, 0xd4, 0x54, 0x56, 0xc5, 0x10, 0x00, - 0x80, 0xc0, 0xe0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x29, 0xc9, 0x65, 0x00, 0x00, 0x11, - 0x15, 0x1b, 0x00, 0xc6, 0x2a, 0xca, 0x6a, 0x00, 0x00, 0x63, 0x75, 0x15, 0x65, 0x00, 0x12, 0x0e, + 0x00, 0x00, 0x29, 0x92, 0x92, 0x29, 0x00, 0x80, 0x54, 0x56, 0xc5, 0x10, 0x00, 0x80, 0xc0, 0xe0, + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x29, 0xc9, 0x65, 0x00, 0x00, 0x11, 0x15, 0x1b, 0x00, + 0x00, 0x00, 0x00, 0xc6, 0x2a, 0xca, 0x6a, 0x00, 0x00, 0x63, 0x75, 0x15, 0x65, 0x00, 0x12, 0x0e, 0x52, 0x00, 0x08, 0x62, 0xa9, 0xa8, 0x68, 0x20, 0xd8, 0x48, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x42, 0x42, 0x42, 0xe2, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x64, 0x54, 0x54, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xb6, 0x00, 0x10, 0x20, 0x20, 0x70, 0x20, 0x00, 0xfc, @@ -392,7 +392,7 @@ const unsigned char bmpDat[][168] PROGMEM = { }, { // 28 no1 - 0x60, 0x00, 0x60, 0x90, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, 0x07, + 0x06, 0x00, 0x06, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe7, 0x07, 0xf1, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x28, 0x11, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x38, 0x1e, 0x0f, @@ -406,7 +406,7 @@ const unsigned char bmpDat[][168] PROGMEM = { }, { // 29 no2 - 0x30, 0x00, 0x30, 0x48, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf3, 0x03, + 0x0c, 0x00, 0x0c, 0x12, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf3, 0x03, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x51, 0x23, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0x70, 0x3c, 0x1f, @@ -434,7 +434,7 @@ const unsigned char bmpDat[][168] PROGMEM = { }, { // 31 no4 - 0x0c, 0x00, 0x0c, 0x12, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0x00, + 0x30, 0x00, 0x30, 0x48, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf8, 0x00, 0xfc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x23, 0x47, 0x8e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0xc0, 0xf0, 0x7c, @@ -448,7 +448,7 @@ const unsigned char bmpDat[][168] PROGMEM = { }, { // 32 no5 - 0x06, 0x00, 0x06, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0x00, + 0x60, 0x00, 0x60, 0x90, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0x00, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x46, 0x8e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x80, 0xe0, 0xf8, diff --git a/chained_bmp/boot1.png b/chained_bmp/boot1.png index 0b73d73229f4254ec2b5a99b7d1988caddb0c716..9cacb9ec1929c3c523eaba3e8ecef552147f188e 100644 GIT binary patch delta 413 zcmV;O0b>5c1H=Q6F@JtZL_t(oh3#0ut^*+m9A5VSf0-U$+zJB1YB!svdubX+7)QlX zVrEA09RNT?W+OBI16q&3>eIC^y1q7K{KilA7!( z6f=w8bP7t+f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(D6iPdzpiK_a}fr&i?6HN}8 z*mGc_39)R=%+?JhYs;okW0h$4AKlXdgXM9;JGlhRQ}{Zl>O&9H!P%BZtaq zB+5diPb-Nm(h-t!!`+PLtRE(ayK&mmW`#n{>gReh2sfk=3vw`^By400000 LNkvXXu0mjfC8Cg3 diff --git a/chained_bmp/no5_chained.png b/chained_bmp/no5_chained.png index 7bb338e0023a8b97189be11c6558eea3537b6a8f..d988d0fc53870235f1f2321dfabb754ea64f0ec9 100644 GIT binary patch delta 310 zcmV-60m=T|0^S0UF@G3IL_t(oh3%Nj4g(u`Ee#u1d5 znTZGhz|64rL=Le507L{)u|{u!w*nDuYD52E=1qw>8-P{#Uw{B?dC;kG6?8VAB9VRw z9V#58D3>8_$YcWzG;k>p6_N>fHKGimOVqGs$f}LVDbGjdoPR*%1k6tB?U^HUPM|E! znU!NGE6yy<-uqbU1vAGDMkEhhvL-8Fo5i-GK34e2JT%Zi0}b2)cn8y^c1u~((0Pcc z6Isr@I@AJ)LK-4!bix*8QAnE{Jqr&yt65goou=oU3Z7#EeVn`o*jf}ZSpsf9x!gZ^ z|JHAKyKYK5b1w@Yg}5P;^%)0DLj|I75yNEKJK(?e|sZk3nCUc;)F~lkU#>50&T&ffT|*bmMy9HF5}h8%vsk<UkE324=!(oI3bhkcN}2;*Y84X)dyxns;40m_&V?aOJJZa3A^oV00000NkvXX Hu0mjf#bt@w diff --git a/digitsune.h b/digitsune.h index 8d17594..eb52916 100644 --- a/digitsune.h +++ b/digitsune.h @@ -12,8 +12,19 @@ #define DISP_DEBUG false #define TEAL 0b0000011111110000 +#define TEAL32 0b00000000000000001111111110000000 #define PINK 0b1111100000010000 +#define PINK32 0b00000000111111110000000010000000 +#define PURPLE 0b1111100000011111 +#define PURPLE32 0b00000000010000000000000011111100 +#define RED 0b1111100000000000 +#define RED32 0b00000000111111110000000000000000 +#define GREEN 0b0000011111100000 +#define GREEN32 0b00000000000000001111111100000000 +#define BLUE 0b0000000000011111 +#define BLUE32 0b00000000000000000000000011111111 #define WHITE 0b1111111111111111 +#define WHITE32 0b00000000111111111111111111111111 #define RMT_MAIN 0x40BF708F #define RMT_VOICE 0x40BFD02F @@ -28,7 +39,11 @@ #define RMT_COLTEAL 0x40BF20DF #define RMT_COLPINK 0x40BF40BF #define RMT_COLPURPLE 0x40BFC03F -#define RMT_DEBUG true +#define RMT_COLRED 0x40BFE01F +#define RMT_COLGREEN 0x40BF609F +#define RMT_COLBLUE 0x40BFA05F +#define RMT_COLWHITE 0x40BF10EF +#define RMT_DEBUG false enum DISP_MODE { DISP_MODE_MAIN, diff --git a/digitsune.ino b/digitsune.ino index 24420e6..be28491 100644 --- a/digitsune.ino +++ b/digitsune.ino @@ -1,7 +1,9 @@ #include "anims.h" Adafruit_NeoMatrix *matrix = new Adafruit_NeoMatrix(DISP_WIDTH, DISP_HEIGHT, DISP_PIN, NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG, NEO_GRB + NEO_KHZ800); +Adafruit_NeoPixel *earPix = new Adafruit_NeoPixel(2, 9, NEO_GRB + NEO_KHZ800); uint16_t curColor = TEAL; +uint32_t curColor32 = TEAL32; void display_bitmap(uint8_t bmp_num) { // Clear prior bitmap first @@ -19,6 +21,11 @@ void display_bitmap_delay(uint8_t bmp_num, uint16_t time){ delay(time); } +void setEarColor(uint32_t col){ + earPix->fill(col, 0, 2); + earPix->show(); +} + // Measurepeak function float measurePeak(uint32_t milliseconds) { float soundMax = 0; @@ -111,11 +118,11 @@ void loop() { break; case RMT_EMOTEYES: modeBlip(); - //emoteHappy(); + emoteYes(); break; case RMT_EMOTENO: modeBlip(); - //emoteHappy(); + emoteNo(); break; case RMT_INFO: modeBlip(); @@ -125,11 +132,43 @@ void loop() { modeBlip(); curColor = TEAL; display_bitmap(currentBitmap); + setEarColor(TEAL32); break; case RMT_COLPINK: modeBlip(); curColor = PINK; display_bitmap(currentBitmap); + setEarColor(PINK32); + break; + case RMT_COLPURPLE: + modeBlip(); + curColor = PURPLE; + display_bitmap(currentBitmap); + setEarColor(PURPLE32); + break; + case RMT_COLRED: + modeBlip(); + curColor = RED; + display_bitmap(currentBitmap); + setEarColor(RED32); + break; + case RMT_COLGREEN: + modeBlip(); + curColor = GREEN; + display_bitmap(currentBitmap); + setEarColor(GREEN32); + break; + case RMT_COLBLUE: + modeBlip(); + curColor = BLUE; + display_bitmap(currentBitmap); + setEarColor(BLUE32); + break; + case RMT_COLWHITE: + modeBlip(); + curColor = WHITE; + display_bitmap(currentBitmap); + setEarColor(WHITE32); break; } @@ -142,15 +181,17 @@ void setup() { #endif CircuitPlayground.begin(); matrix->begin(); + earPix->begin(); matrix->setBrightness(DISP_BRIGHTNESS); CircuitPlayground.speaker.enable(true); CircuitPlayground.irReceiver.enableIRIn(); - + #if DISP_DEBUG matrix->fillScreen(TEAL); matrix->show(); #else // if not debugging the display, show the boot img and then main display_bitmap(0); + setEarColor(TEAL32); happyChirp(); //sng1(); delay(1000); diff --git a/sfx.h b/sfx.h index 9baa278..41b78c7 100644 --- a/sfx.h +++ b/sfx.h @@ -102,16 +102,6 @@ void happyChirp() { CircuitPlayground.playTone(7000, 25); } -void sadChirp() { - CircuitPlayground.playTone(1500, 25); - CircuitPlayground.playTone(3500, 25); - CircuitPlayground.playTone(5500, 25); - delay(125); - CircuitPlayground.playTone(500, 25); - CircuitPlayground.playTone(2500, 25); - CircuitPlayground.playTone(4500, 25); -} - void errChirp() { CircuitPlayground.playTone(500, 15); CircuitPlayground.playTone(2500, 15); @@ -141,6 +131,14 @@ void sighOut() { } } +void ynSnd1() { + CircuitPlayground.playTone(500, 80); +} + +void ynSnd2() { + CircuitPlayground.playTone(1000, 80); +} + void sng1() { int len[13] = {1, 1, 16, 3, 3, 2, 4, 4, 4, 1, 4, 2, 14}; int note[13] = {NOTE_F4, NOTE_E4, NOTE_F4, NOTE_E4, NOTE_F4, NOTE_G4, NOTE_E4, NOTE_C4, NOTE_A3, NOTE_C4, NOTE_E4, NOTE_F4, NOTE_D4};