MOTOROBIT — EVERYTHING FOR TECHNOLOGY LOVERS, ALL IN ONE PLACE!
MORE THAN 30,000 PRODUCTS – AN EXTENSIVE PRODUCT RANGE
YOUR PARTNER IN ELECTRONIC COMPONENT SUPPLY
EXPAND YOUR CREATIVITY BEYOND LIMITS WITH MOTOROBIT
{{ t.categories }} ({{ live_data.categories.length }})
{{ t.brands }} ({{ live_data.brands.length }})
{{ t.products }} ({{ live_data.products.length }})
{{ t.see_all }}
Menu
If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!
If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!If you cannot find a specific electronic or automation spare part on our website or in the market, please contact us — quantity does not matter!
Making a Bluetooth Controlled Vehicle with Arduino
Publish Time: 21.07.2023
Reading Time: 1 Minute
Making a Bluetooth Controlled Vehicle with Arduino

Building a Bluetooth Controlled Vehicle with Arduino

Hello friends, in this blog post, we will talk about building a bluetooth controlled vehicle with Arduino.

Materials List

·Arduino Uno

·Hc-06 Bluetooth

·L298N Motor Driver

·Power Source (9v Battery, Lipo Battery, etc.)
 
 

Arduino Code

String readString;
const int in1 = 7;
const int in2 = 6;
const int in3 = 5;
const int in4 = 4;

void setup(){

pinMode(in1, OUTPUT); //Set all pins as OUTPUT for motor control.
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);

Serial.begin(9600); /* Start serial communication */
}
void loop()
{
while(Serial.available()){

delay(3);
char c= Serial.read();
readString+=c;
}
if(readString.length()>0){
Serial.println(readString);
if(readString=="a"){


digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);


}
if(readString=="b"){

digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
}
if(readString=="c"){

digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);

}

if(readString=="d"){


digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);

}
if(readString=="e"){

digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, LOW);

}
readString="";
}
}

Share
T-Soft | Premium