test avoid bulled game
Dependencies: C12832_lcd LCD_fonts mbed mbed-rtos
main.cpp@4:0fe59e58def9, 2016-12-02 (annotated)
- Committer:
- kaku_jyoko
- Date:
- Fri Dec 02 07:35:34 2016 +0000
- Revision:
- 4:0fe59e58def9
- Parent:
- 1:b8a29dc23cf1
- Child:
- 5:651879f4f047
thread
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
th_mbed | 0:26e5e770f91b | 1 | #include "mbed.h" |
th_mbed | 0:26e5e770f91b | 2 | #include "C12832_lcd.h" |
th_mbed | 0:26e5e770f91b | 3 | #include "Arial_9.h" |
th_mbed | 0:26e5e770f91b | 4 | #include "Small_7.h" |
th_mbed | 0:26e5e770f91b | 5 | #include "graphics.h" |
kaku_jyoko | 4:0fe59e58def9 | 6 | #include "models.h" |
kaku_jyoko | 4:0fe59e58def9 | 7 | #include "rtos.h" |
kaku_jyoko | 4:0fe59e58def9 | 8 | |
th_mbed | 0:26e5e770f91b | 9 | |
th_mbed | 0:26e5e770f91b | 10 | C12832_LCD lcd; |
th_mbed | 0:26e5e770f91b | 11 | |
kaku_jyoko | 4:0fe59e58def9 | 12 | // down: p12, left: p13, center: p14, up: p15, right: p16 |
kaku_jyoko | 4:0fe59e58def9 | 13 | DigitalIn button(p14); |
kaku_jyoko | 4:0fe59e58def9 | 14 | |
kaku_jyoko | 4:0fe59e58def9 | 15 | int jump_flag = 0; |
kaku_jyoko | 4:0fe59e58def9 | 16 | |
kaku_jyoko | 4:0fe59e58def9 | 17 | //int main(){ |
kaku_jyoko | 4:0fe59e58def9 | 18 | // lcd.cls(); |
kaku_jyoko | 4:0fe59e58def9 | 19 | // lcd.set_font((unsigned char*) Arial_9); |
kaku_jyoko | 4:0fe59e58def9 | 20 | // while(1){ |
kaku_jyoko | 4:0fe59e58def9 | 21 | // lcd.print_bm(bitmPerson,2,32-6); |
kaku_jyoko | 4:0fe59e58def9 | 22 | // lcd.copy_to_lcd(); |
kaku_jyoko | 4:0fe59e58def9 | 23 | // wait(0.5); |
kaku_jyoko | 4:0fe59e58def9 | 24 | // lcd.print_bm(bitmPersonB,2,32-6); |
kaku_jyoko | 4:0fe59e58def9 | 25 | // lcd.copy_to_lcd(); |
kaku_jyoko | 4:0fe59e58def9 | 26 | // wait(0.5); |
kaku_jyoko | 4:0fe59e58def9 | 27 | // } |
kaku_jyoko | 4:0fe59e58def9 | 28 | //} |
kaku_jyoko | 4:0fe59e58def9 | 29 | |
th_mbed | 0:26e5e770f91b | 30 | int main(){ |
kaku_jyoko | 4:0fe59e58def9 | 31 | Thread receive_th(receive); |
kaku_jyoko | 4:0fe59e58def9 | 32 | } |
kaku_jyoko | 4:0fe59e58def9 | 33 | |
kaku_jyoko | 4:0fe59e58def9 | 34 | void receive(void const *argument){ |
kaku_jyoko | 4:0fe59e58def9 | 35 | while(true){ |
kaku_jyoko | 4:0fe59e58def9 | 36 | if(button){ |
kaku_jyoko | 4:0fe59e58def9 | 37 | jump_flag = 1; |
kaku_jyoko | 4:0fe59e58def9 | 38 | } |
th_mbed | 0:26e5e770f91b | 39 | } |
th_mbed | 0:26e5e770f91b | 40 | } |