#include int RECV_PIN = A0; int statusled = 13; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { irrecv.enableIRIn(); pinMode(statusled,OUTPUT); pinMode(9,OUTPUT); pinMode(8,OUTPUT); pinMode(7,OUTPUT); pinMode(6,OUTPUT); pinMode(5,OUTPUT); pinMode(4,OUTPUT); pinMode(3,OUTPUT); pinMode(2,OUTPUT); digitalWrite(statusled,LOW); } void loop() { if (irrecv.decode(&results)) { digitalWrite(statusled,HIGH); irrecv.resume(); if (results.value == 0xFFA25D){ // type your remote forward robot control button hex value in underlined area. digitalWrite(2,HIGH); }else if (results.value == 0xFF629D){ // type your remote forward robot control button hex value in underlined area. digitalWrite(2,LOW); }else if(results.value == 0xFF22DD){ // type your remote left robot control button hex value in underlined area. digitalWrite(3,HIGH); } else if(results.value == 0xFF02FD){ // type your remote left robot control button hex value in underlined area. digitalWrite(3,LOW); } else if(results.value == 0xFFE01F){ // type your remote right robot control button hex value in underlined area. digitalWrite(4,HIGH); } else if(results.value == 0xFFA857){ // type your remote right robot control button hex value in underlined area. digitalWrite(4,LOW); } else if(results.value == 0xFF6897){ // type your remote backward robot control button hex value in underlined area. digitalWrite(5,HIGH); }else if(results.value == 0xFF9867){ // type your remote backward robot control button hex value in underlined area. digitalWrite(5,LOW); }else if(results.value == 0xFF30CF){ // type your remote stop robot control button hex value in underlined area. digitalWrite(6,HIGH); }else if(results.value == 0xFF18E7){ // type your remote stop robot control button hex value in underlined area. digitalWrite(6,LOW); }else if(results.value == 0xFF10EF){ // type your remote stop robot control button hex value in underlined area. digitalWrite(7,HIGH); }else if(results.value == 0xFF38C7){ // type your remote stop robot control button hex value in underlined area. digitalWrite(7,LOW); }else if(results.value == 0xFF42BD){ // type your remote stop robot control button hex value in underlined area. digitalWrite(8,HIGH); }else if(results.value == 0xFF4AB5){ // type your remote stop robot control button hex value in underlined area. digitalWrite(8,LOW); } } }