diff --git a/UNHB-Esel/UNHB-Esel.ino b/UNHB-Esel/UNHB-Esel.ino index 840c392..38bb0e0 100644 --- a/UNHB-Esel/UNHB-Esel.ino +++ b/UNHB-Esel/UNHB-Esel.ino @@ -58,6 +58,19 @@ void loadColorMap(uint8_t cmap[]) { } } +// play a given sub-animation +void playBwAnimation(int animDelay, uint8_t anim[][8]) { + + for(int frame=0; frame<7; frame++) { + for(int n=0; n=0; frame--) { - for(int n=0; n>4 )] ); strip.SetPixelColor( 2*n+1, *c[(test2[n]&0x0F)] ); strip.Show(); delay(1000); } - delay(10000); + delay(10000);*/ Serial.println("Loop end ..."); } diff --git a/UNHB-Esel/defaults.h b/UNHB-Esel/defaults.h index 230861c..b690eb9 100644 --- a/UNHB-Esel/defaults.h +++ b/UNHB-Esel/defaults.h @@ -16,50 +16,518 @@ uint8_t colorMap[] = { 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xb9, 0xf5, 0xf4, 0xeb }; -uint8_t brightness = 64; +uint8_t brightness = 32; + +uint8_t eye_blink_c[][8] = { +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00000000, +B00111100, +B01111110, +B11100111, +B11101111, +B01111110, +B00111100, +B00000000 +}, +{ +B00000000, +B00000000, +B01111110, +B11100111, +B01111110, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00000000, +B00000000, +B11111111, +B11111111, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00000000, +B01111110, +B11100111, +B01111110, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00111100, +B01111110, +B11100111, +B11101111, +B01111110, +B00111100, +B00000000 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +} +}; + +uint8_t eye_blink_l[][8] = { +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +}, +{ +B00000000, +B00111100, +B01111110, +B10011111, +B10111111, +B01111110, +B00111100, +B00000000 +}, +{ +B00000000, +B00000000, +B01111110, +B10011111, +B01111110, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00000000, +B00000000, +B11111111, +B11111111, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00000000, +B01111110, +B10011111, +B01111110, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00111100, +B01111110, +B10011111, +B10111111, +B01111110, +B00111100, +B00000000 +}, +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +} +}; + +uint8_t eye_blink_r[][8] = { +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +}, +{ +B00000000, +B00111100, +B01111110, +B11111001, +B11111011, +B01111110, +B00111100, +B00000000 +}, +{ +B00000000, +B00000000, +B01111110, +B11111001, +B01111110, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00000000, +B00000000, +B11111111, +B11111111, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00000000, +B01111110, +B11111001, +B01111110, +B00000000, +B00000000, +B00000000 +}, +{ +B00000000, +B00111100, +B01111110, +B11111001, +B11111011, +B01111110, +B00111100, +B00000000 +}, +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +} +}; + +uint8_t eye_move_cr[][8] = { +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11110011, +B11110111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11110011, +B11110111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +} +}; + +uint8_t eye_move_rc[][8] = { +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11111001, +B11111011, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11110011, +B11110111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11110011, +B11110111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +} +}; + +uint8_t eye_move_cl[][8] = { +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11001111, +B11011111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11001111, +B11011111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +} +}; + +uint8_t eye_move_lc[][8] = { +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B10011111, +B10111111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11001111, +B11011111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11001111, +B11011111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +}, +{ +B00111100, +B01111110, +B11111111, +B11100111, +B11101111, +B11111111, +B01111110, +B00111100 +} +}; + -uint8_t eye_blink[][8] = { - { B00111100, - B01000010, - B10000001, - B10001101, - B10001101, - B10000001, - B01000010, - B00111100 }, - { B00111100, - B01111110, - B10000001, - B10001101, - B10001101, - B10000001, - B01111110, - B00111100 }, - - { B00000000, - B00111100, - B01111110, - B10000001, - B10000001, - B01111110, - B00111100, - B00000000 }, - - { B00000000, - B00000000, - B01111110, - B11111111, - B11111111, - B01111110, - B00000000, - B00000000 }, - - { B00000000, - B00000000, - B00000000, - B11111111, - B11111111, - B00000000, - B00000000, - B00000000 } };