keyestudio
www.keyestudio.com
}
void IR_Control(void)
{
unsigned long Key;
lcd.setCursor(0,0); //setting cursor in the first row and column
lcd.print("IR_Ctr ");
while(Key!=IR_ESC)
{
if(irrecv.decode(&results)) //judging if serial port receives data
{
Key = results.value;
switch(Key)
{
case IR_Go:advance(); //UP
break;
case IR_Back: back(); //back
break;
case IR_Left:turnL(); //Left
break;
case IR_Right:turnR(); //Righ
break;
case IR_Stop:stopp(); //stop
break;
default:
break;
}