Simple splash screen (my name) on a 128*32 LCD using a bitmap image
Dependents: Splash_Screen_program
Fork of splash_screen by
splash_screen.h@1:bd05276c609a, 2013-08-05 (annotated)
- Committer:
- kevin_de_koninck
- Date:
- Mon Aug 05 14:41:34 2013 +0000
- Revision:
- 1:bd05276c609a
- Parent:
- 0:0b4018781642
minor update
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kevin_de_koninck | 0:0b4018781642 | 1 | #ifndef splash_screen_H |
kevin_de_koninck | 0:0b4018781642 | 2 | #define splash_screen_H |
kevin_de_koninck | 0:0b4018781642 | 3 | |
kevin_de_koninck | 0:0b4018781642 | 4 | #include "mbed.h" |
kevin_de_koninck | 0:0b4018781642 | 5 | #include "splash_graphics.h" |
kevin_de_koninck | 0:0b4018781642 | 6 | #include "C12832_lcd.h" |
kevin_de_koninck | 0:0b4018781642 | 7 | |
kevin_de_koninck | 0:0b4018781642 | 8 | |
kevin_de_koninck | 0:0b4018781642 | 9 | |
kevin_de_koninck | 0:0b4018781642 | 10 | |
kevin_de_koninck | 0:0b4018781642 | 11 | void splash_screen(C12832_LCD lcd) |
kevin_de_koninck | 0:0b4018781642 | 12 | { |
kevin_de_koninck | 0:0b4018781642 | 13 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 14 | //inschuiven naar rechts tot het midden |
kevin_de_koninck | 0:0b4018781642 | 15 | for(int i = 0; i<21; i++) {//105 |
kevin_de_koninck | 0:0b4018781642 | 16 | lcd.print_bm(bitmKevin,-86+i*5,4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 17 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 18 | wait(0.022); |
kevin_de_koninck | 0:0b4018781642 | 19 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 20 | } |
kevin_de_koninck | 0:0b4018781642 | 21 | |
kevin_de_koninck | 0:0b4018781642 | 22 | //overshoot naar rechts |
kevin_de_koninck | 0:0b4018781642 | 23 | for(int i = 0; i<5; i++) { |
kevin_de_koninck | 0:0b4018781642 | 24 | lcd.print_bm(bitmKevin,19+i,4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 25 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 26 | wait(0.015); |
kevin_de_koninck | 0:0b4018781642 | 27 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 28 | } |
kevin_de_koninck | 0:0b4018781642 | 29 | //overshoot naar links |
kevin_de_koninck | 0:0b4018781642 | 30 | for(int i = 0; i<9; i++) { |
kevin_de_koninck | 0:0b4018781642 | 31 | lcd.print_bm(bitmKevin,(19+5)-i,4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 32 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 33 | wait(0.015); |
kevin_de_koninck | 0:0b4018781642 | 34 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 35 | } |
kevin_de_koninck | 0:0b4018781642 | 36 | //overshoot naar rechts |
kevin_de_koninck | 0:0b4018781642 | 37 | for(int i = 0; i<7; i++) { |
kevin_de_koninck | 0:0b4018781642 | 38 | lcd.print_bm(bitmKevin,(19-4)+i,4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 39 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 40 | wait(0.015); |
kevin_de_koninck | 0:0b4018781642 | 41 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 42 | } |
kevin_de_koninck | 0:0b4018781642 | 43 | //overshoot naar links |
kevin_de_koninck | 0:0b4018781642 | 44 | for(int i = 0; i<5; i++) { |
kevin_de_koninck | 0:0b4018781642 | 45 | lcd.print_bm(bitmKevin,(19+3)-i,4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 46 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 47 | wait(0.015); |
kevin_de_koninck | 0:0b4018781642 | 48 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 49 | } |
kevin_de_koninck | 0:0b4018781642 | 50 | //overshoot naar rechts |
kevin_de_koninck | 0:0b4018781642 | 51 | for(int i = 0; i<2; i++) { |
kevin_de_koninck | 0:0b4018781642 | 52 | lcd.print_bm(bitmKevin,(19-2)+i,4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 53 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 54 | wait(0.015); |
kevin_de_koninck | 0:0b4018781642 | 55 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 56 | } |
kevin_de_koninck | 0:0b4018781642 | 57 | //overshoot naar links |
kevin_de_koninck | 0:0b4018781642 | 58 | lcd.print_bm(bitmKevin,(19+1),4); // print Name |
kevin_de_koninck | 0:0b4018781642 | 59 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 60 | wait(0.015); |
kevin_de_koninck | 0:0b4018781642 | 61 | lcd.cls(); |
kevin_de_koninck | 0:0b4018781642 | 62 | |
kevin_de_koninck | 0:0b4018781642 | 63 | |
kevin_de_koninck | 0:0b4018781642 | 64 | lcd.print_bm(bitmKevin,19,4); |
kevin_de_koninck | 0:0b4018781642 | 65 | lcd.copy_to_lcd(); |
kevin_de_koninck | 0:0b4018781642 | 66 | } |
kevin_de_koninck | 0:0b4018781642 | 67 | |
kevin_de_koninck | 0:0b4018781642 | 68 | |
kevin_de_koninck | 0:0b4018781642 | 69 | |
kevin_de_koninck | 0:0b4018781642 | 70 | |
kevin_de_koninck | 0:0b4018781642 | 71 | #endif |