Elegoo Smart Car Kit Ir remote control car/remote coding issue.

Hello, my class has a project on making a Elegoo car to complete tasks & using things like 3-d printing,etc. My one problem is I have my Ir remote control car program that doesn't really work. After using the library , and even may other codes the best was the one from the website. All it allows me to do is to just move the left wheels, it does back,forward,etc all good, it's just that the right doesn't work AT ALL. I even tried seeing if it was the motor control (fine). And even did an auto go in which all the wheels worked. I have no idea and tried for hours to figure it out. I'll leave the code below, and ask that you might help me in what i'm doing wrong.
#include <IRremote.h>

#define F 16736925
#define B 16754775
#define L 16720605
#define R 16761405
#define S 16712445
#define UNKNOWN_F 5316027
#define UNKNOWN_B 2747854299
#define UNKNOWN_L 1386468383
#define UNKNOWN_R 553536955
#define UNKNOWN_S 3622325019
int RECV_PIN = 12;
int in1=6;
int in2=7;
int in3=8;
int in4=9;
int ENA=5;
int ENB=11;
int ABS=250;

IRrecv irrecv(RECV_PIN);
decode_results results;
unsigned long val;

void _mForward()
{
analogWrite(ENA,ABS);
analogWrite(ENB,ABS);
digitalWrite(in1,HIGH);//digital output
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,HIGH);
Serial.println("go forward!");
}
void _mBack()
{
analogWrite(ENA,ABS);
analogWrite(ENB,ABS);
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
Serial.println("go back!");
}
void _mleft()
{
analogWrite(ENA,ABS);
analogWrite(ENB,ABS);
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
Serial.println("go left!");
}
void _mright()
{
analogWrite(ENA,ABS);
analogWrite(ENB,ABS);
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
Serial.println("go right!");
}
void _mStop()
{
digitalWrite(ENA,LOW);
digitalWrite(ENB,LOW);
Serial.println("STOP!");
}

void setup() {
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
pinMode(in3,OUTPUT);
pinMode(in4,OUTPUT);
pinMode(ENA,OUTPUT);
pinMode(ENB,OUTPUT);
_mStop();
irrecv.enableIRIn();
Serial.begin(9600);
}

void loop() {
if (irrecv.decode(&results)){
val = results.value;
Serial.println(val);
irrecv.resume();
switch(val){
case F:
case UNKNOWN_F: _mForward();break;
case B:
case UNKNOWN_B: _mBack(); break;
case L:
case UNKNOWN_L: _mleft(); break;
case R:
case UNKNOWN_R: _mright();break;
case S:
case UNKNOWN_S: _mStop(); break;
default:break;
}
}
}

LukeLuke:
I'll leave the code below

Looks like you forgot that part :wink: but while you're adding it, provide more details of the hardware too (schematics, links to parts etc etc).

sorry about that, try now.

Looks like you forgot a few things. A good start would be to go to the top of this page and read how to use this forum. Pay close attention to #7.

Do your Serial.print()s tell that you are always getting into the correct bits of code?

You say both motors worked when you did an "auto go"? What's an "auto go"?

And you tried the motor control and it was fine? What is the motor control? And how did you test it and decide it was fine?

What you describe sounds most like a wiring problem. But since we don't know what motors or motor driver or power source you're using or how anything is wired...it's anyone's guess.

Steve

Hey Steve,

I can confirm that it was not motor control (the part connected to the arduino uno) because when I did an auto go (a program that I plugged in to the elegoo car) all 4 wheels were turning and doing the execution. However, when I plugged in the Inferred Remote Control code (pasted above) the best when testing it (running off battery power) was 2 wheels being able to move forwards,backwards,left,right,and stop, while the right one sat there with no movements, so it must be the programming. however, while working on and even changing diffrent inputs like High/Low in some video's, it didn't work that is why i'm wondering if it's something to do with in input plugs. I read a post about how the input 12 plug is an interrupter to the code running, but i'm not sure.