sota
Dependencies: mbed
Fork of newdot by
main.cpp@0:6e7a6e71dad3, 2016-12-03 (annotated)
- Committer:
- dragondrunk
- Date:
- Sat Dec 03 10:17:37 2016 +0000
- Revision:
- 0:6e7a6e71dad3
- Child:
- 1:be91a16b48ea
Nasrun
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dragondrunk | 0:6e7a6e71dad3 | 1 | /***************** For test only ****************/ |
dragondrunk | 0:6e7a6e71dad3 | 2 | |
dragondrunk | 0:6e7a6e71dad3 | 3 | #include "mbed.h" |
dragondrunk | 0:6e7a6e71dad3 | 4 | #include "ColorMbed.h" |
dragondrunk | 0:6e7a6e71dad3 | 5 | |
dragondrunk | 0:6e7a6e71dad3 | 6 | ColorMbed dotmatrix; |
dragondrunk | 0:6e7a6e71dad3 | 7 | Timer t; |
dragondrunk | 0:6e7a6e71dad3 | 8 | |
dragondrunk | 0:6e7a6e71dad3 | 9 | int main(){ |
dragondrunk | 0:6e7a6e71dad3 | 10 | // uint8_t rgb[3] = {255,255,100}; |
dragondrunk | 0:6e7a6e71dad3 | 11 | uint8_t rgb[3] = {10,20,0}; |
dragondrunk | 0:6e7a6e71dad3 | 12 | uint8_t pic[8] = {0x1C,0x00,0x20,0x20,0x20,0x20,0x00,0x00}; |
dragondrunk | 0:6e7a6e71dad3 | 13 | uint8_t pic2[8] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; |
dragondrunk | 0:6e7a6e71dad3 | 14 | uint8_t dream_ship[8] = {0x40,0x50,0x41,0x4E,0x00,0x92,0x14,0x04}; |
dragondrunk | 0:6e7a6e71dad3 | 15 | // for coordinate |
dragondrunk | 0:6e7a6e71dad3 | 16 | //uint8_t pic2[8] = {0x7E,0xDF,0xFF,0xF0,0xFF,0x7E,0x3C,0x3C}; |
dragondrunk | 0:6e7a6e71dad3 | 17 | //uint8_t tmp_pic[8] = {0}; |
dragondrunk | 0:6e7a6e71dad3 | 18 | dotmatrix.init(); |
dragondrunk | 0:6e7a6e71dad3 | 19 | |
dragondrunk | 0:6e7a6e71dad3 | 20 | while(1){ |
dragondrunk | 0:6e7a6e71dad3 | 21 | dotmatrix.display_pic(dream_ship,rgb); |
dragondrunk | 0:6e7a6e71dad3 | 22 | } |
dragondrunk | 0:6e7a6e71dad3 | 23 | |
dragondrunk | 0:6e7a6e71dad3 | 24 | return 0; |
dragondrunk | 0:6e7a6e71dad3 | 25 | |
dragondrunk | 0:6e7a6e71dad3 | 26 | |
dragondrunk | 0:6e7a6e71dad3 | 27 | } |