Jirat Nakarit
/
project_ShipDot
Jirat
Fork of project by
Diff: ColorMbed.h
- Revision:
- 22:5bc894988f11
diff -r d76aa19984be -r 5bc894988f11 ColorMbed.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ColorMbed.h Sun Dec 04 05:02:03 2016 +0000 @@ -0,0 +1,56 @@ +/* +************************************* +I have some idea to create only three function +display ship; +display dot or bomb; +finally display game interface; +************************************* +*/ + +#ifndef ColorMbed_H +#define ColorMbed_H + +#include "mbed.h" + +class ColorMbed{ + +public: + + void init(); // set white_balance + /* + display_dot can display one dot on dot matrix + parameter : + row : int (1,2,3,...,8) + column : int (1,2,3,...,8) + color : {B,G,R} + */ + void display_dot(int row,int column,int *color); + /* + display_ship 1 to 8 such as + ship 1 is 4 chanal on dot matrix + ship 2 is 3 chanal on dot matrix + 2 : ship 3 is 2 chanal on dot matrix + 4 : ship 4 is 1 chanal on dot matrix + fix rgb !!! + parameter : + type : int (ship 1..2.3.4) + row : int (1,2,3,4,...,8) + column : int (1,2,3,4,...,8) + */ + void display_ship(int row,int column,int type,int *color); + + void display_pic(int *pic,int *color); + /* + display picture from hexa code color in this function is + only color and blank + */ + + + +private : + + int _power(int number , int power); // power number +}; + + +#endif