Page 235 - 최강 아두이노 스마트 자동차 로봇 키트
P. 235

Serial.print(-(int)results->rawbuf[i] *
                 USECPERTICK, DEC);
                         }
                         Serial.print(" ");
                     }
                     Serial.println("");
                 }


                 //
                 String decode_IRvalue(unsigned long irValue)
                 {
                     for (int i = 0; i < 21; i++)
                     {
                         if (irData[i].value == irValue)
                         {
                             return irData[i].name;
                         }
                     }
                     Serial.println("Not Defined.");
                     return String("key Value None"); // is exist copy
                 string method?
                 }

                 void controllerByIRCommand(String& szIRCmd)
                 {
                     if (szIRCmd == "+") // speed up
                     {
                         g_carSpeed += 20;
                         g_carSpeed = min(g_carSpeed, 255);
                         Serial.print("Speed Up ");
                         Serial.println(g_carSpeed);
                     }
                     else
                     if (szIRCmd == "-") // speed down
                     {
                         g_carSpeed -= 20;
                         g_carSpeed = max(g_carSpeed, 70);

                         Serial.print("Speed down ");
                         Serial.println(g_carSpeed);
                     }
                     else
                     if (szIRCmd == "2") // 전진
                     {





                                                   234
   230   231   232   233   234   235   236   237   238   239   240