
Programa de MIP
Dependencies: bloques ball mbed WS2812 PixelArray tsi_sensor TSI bloque MMA8451Q
Revision 23:086769f6d94d, committed 2021-05-27
- Comitter:
- anna_dot
- Date:
- Thu May 27 19:36:57 2021 +0000
- Parent:
- 22:5743b7c91da4
- Commit message:
- here we gooo
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5743b7c91da4 -r 086769f6d94d main.cpp --- a/main.cpp Thu May 27 19:31:13 2021 +0000 +++ b/main.cpp Thu May 27 19:36:57 2021 +0000 @@ -58,6 +58,7 @@ void printSliderMode(); void printAccelMode(); void cyclePrintModeInfo(); +void printEmojiLose(); int main() @@ -374,12 +375,14 @@ cont_ball_rebote=0; lose=addLineOfBloques(); + } cont_ball_rebote++; }else if(old_i==0){ refresh_ball.detach(); clear_matrix(0); - wsLEDS.write(px.getBuf()); + printEmojiLose(); + //wsLEDS.write(px.getBuf()); lose=true; } @@ -490,7 +493,8 @@ if(end_game){ refresh_ball.detach(); clear_matrix(0); - wsLEDS.write(px.getBuf()); + printEmojiLose(); + //wsLEDS.write(px.getBuf()); } else{ clear_matrix(32); @@ -660,3 +664,39 @@ contModePrintInfo=0; } } +void printEmojiLose(){ + + //Base amarillo emoji + print_pixel(255,255,0, 0,5, -1, -1,6); + print_pixel(255,255,0, 1,3, -1, -1,10); + print_pixel(255,255,0, 2,2, -1, -1,12); + print_pixel(255,255,0, 3,1, -1, -1,14); + print_pixel(255,255,0, 4,1, -1, -1,14); + print_pixel(255,255,0, 5,0, -1, -1,16); + print_pixel(255,255,0, 6,0, -1, -1,16); + print_pixel(255,255,0, 7,0, -1, -1,16); + print_pixel(255,255,0, 8,0, -1, -1,16); + print_pixel(255,255,0, 9,0, -1, -1,16); + print_pixel(255,255,0, 10,1, -1, -1,14); + print_pixel(255,255,0, 11,1, -1, -1,14); + print_pixel(255,255,0, 12,1, -1, -1,14); + print_pixel(255,255,0, 13,2, -1, -1,12); + print_pixel(255,255,0, 14,3, -1, -1,10); + print_pixel(255,255,0, 15,5, -1, -1,6); + + //Parte cara emoji + print_pixel(0,0,0, 4,5, -1, -1); + print_pixel(0,0,0, 5,6, -1, -1,4); + print_pixel(0,0,0, 4,10, -1, -1); + + + print_pixel(0,0,0, 9,2, -1, -1); + print_pixel(0,0,0, 9,5, -1, -1); + print_pixel(0,0,0, 9,10, -1, -1); + print_pixel(0,0,0, 9,13, -1, -1); + + print_pixel(0,0,0, 8,3, -1, -1,2); + print_pixel(0,0,0, 8,11, -1, -1,2); + + wsLEDS.write(px.getBuf()); +} \ No newline at end of file