Aws_Alkarmi
Published © CC0

RC Drift Car by Arduino UNO

How to make A remote controlled Car. high speed and high torque. Build your own RC Car Better than the Market.

AdvancedFull instructions provided8,442
RC Drift Car by Arduino UNO

Things used in this project

Hardware components

Signal Relay, 5 VDC
Signal Relay, 5 VDC
×2
Arduino UNO
Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1
DC Motor, Miniature
DC Motor, Miniature
×3

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Code

RC Car Code By Aws Alkarmi

Arduino
int ForwordSignal=A1;
int BackwordSignal=A4;
int LEDs=3;
int ForwordMotor=4;
int BackwordMotor=12;
int code1;
int cod2;
int FM=0;
int BM=0;
int state=0;
int testRelay=8;



void setup() {
 
      Serial.begin(9600);
      pinMode(ForwordSignal,INPUT);
      pinMode(BackwordSignal,INPUT);
      pinMode(ForwordMotor,OUTPUT);
      pinMode(BackwordMotor,OUTPUT);
      pinMode(LEDs,OUTPUT);
      pinMode(testRelay,OUTPUT);


}

void loop() {
     FM=analogRead(ForwordSignal);
     BM=analogRead(BackwordSignal);

     Serial.println("B");
     Serial.println("----");
     Serial.println("F");

     if(FM>200) //  3.3volts ---675 bit
     {
      digitalWrite(ForwordMotor,HIGH);// LOW to start the relay 
      digitalWrite(BackwordMotor,LOW); // HIGH to stop the relay 
      digitalWrite(testRelay,LOW);
      
      state=1;
                   Serial.print("FM is");
                   Serial.println(FM);

     }else if(BM>200)
      {
        digitalWrite(BackwordMotor,HIGH);//very good
        digitalWrite(ForwordMotor,LOW);
        ; // HIGH to stop the relay 

                Serial.print("BM is");
                Serial.println(BM);

        state=2;
      }else{digitalWrite(ForwordMotor,HIGH);
        digitalWrite(BackwordMotor,HIGH);
        digitalWrite(testRelay,HIGH); // HIGH to stop the relay 

      };
     


}

Credits

Aws_Alkarmi
5 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.