36 g_bluetooth = ev3_serial_open_file(EV3_SERIAL_BT);
37 assert(g_bluetooth != NULL);
44 const char* color_name[7] = {
"NONE",
"BLACK",
"WHITE",
"RED",
"BLUE",
"YELLOW",
"GREEN" };
46 controller.
printDisplay(2,
" create from github.com/korosuke613/etrobocon2018");
55 auto result = distinguisher.getColor();
56 controller.
printDisplay(4,
"HSV: %3d, %3d, %3d", static_cast<int16_t>(distinguisher.hsv.h),
57 static_cast<int16_t>(distinguisher.hsv.s),
58 static_cast<int16_t>(distinguisher.hsv.v));
61 controller.
printDisplay(7,
"Color Name: %s", color_name[static_cast<int>(result)]);
void tslpTsk(int16_t time)
bool buttonIsPressedBack()
走行体のカラーセンサを用いて、RGB情報より色を推定するクラス。
void printDisplay(int8_t row, const char *format,...)