How to use l298n module with bluetooth hc05/06

  Рет қаралды 6,170

Passion Tech KLM

Passion Tech KLM

Күн бұрын

This video is for educational purpose.
Download the code here;github.com/pas...
Download the schematic here;github.com/pas...

Пікірлер: 15
@SavasBekirGuven
@SavasBekirGuven 4 ай бұрын
Harika,proje ödevime çok yardımcı oldu, teşekkür ederim.
@lifiacademy1234
@lifiacademy1234 Жыл бұрын
aapka same program use kiya but vo bata raha ki many function ko not declaired in this scope
@passiontechklm
@passiontechklm Жыл бұрын
Make sure you connect Arduino Gnd pin and L298N negative pin together.
@siddharthkoppu6901
@siddharthkoppu6901 9 ай бұрын
@@passiontechklm even check if you removed rx and tx when uploading the code and keep the tx and rx pin after arduino uno upload the code. the code which works is #define in1 5 //L298n Motor Driver pins. #define in2 6 #define in3 10 #define in4 11 #define LED 13 int command; //Int to store app command state. int Speed = 204; // 0 - 255. int Speedsec; int buttonState = 0; int lastButtonState = 0; int Turnradius = 0; //Set the radius of a turn, 0 - 255 Note:the robot will malfunction if this is higher than int Speed. int brakeTime = 45; int brkonoff = 1; //1 for the electronic braking system, 0 for normal. void setup() { pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pinMode(in3, OUTPUT); pinMode(in4, OUTPUT); pinMode(LED, OUTPUT); //Set the LED pin. Serial.begin(9600); //Set the baud rate to your Bluetooth module. } void loop() { if (Serial.available() > 0) { command = Serial.read(); Stop(); //Initialize with motors stoped. switch (command) { case 'F': forward(); break; case 'B': back(); break; case 'L': left(); break; case 'R': right(); break; case 'G': forwardleft(); break; case 'I': forwardright(); break; case 'H': backleft(); break; case 'J': backright(); break; case '0': Speed = 100; break; case '1': Speed = 140; break; case '2': Speed = 153; break; case '3': Speed = 165; break; case '4': Speed = 178; break; case '5': Speed = 191; break; case '6': Speed = 204; break; case '7': Speed = 216; break; case '8': Speed = 229; break; case '9': Speed = 242; break; case 'q': Speed = 255; break; } Speedsec = Turnradius; if (brkonoff == 1) { brakeOn(); } else { brakeOff(); } } } void forward() { analogWrite(in1, Speed); analogWrite(in3, Speed); } void back() { analogWrite(in2, Speed); analogWrite(in4, Speed); } void left() { analogWrite(in3, Speed); analogWrite(in2, Speed); } void right() { analogWrite(in4, Speed); analogWrite(in1, Speed); } void forwardleft() { analogWrite(in1, Speedsec); analogWrite(in3, Speed); } void forwardright() { analogWrite(in1, Speed); analogWrite(in3, Speedsec); } void backright() { analogWrite(in2, Speed); analogWrite(in4, Speedsec); } void backleft() { analogWrite(in2, Speedsec); analogWrite(in4, Speed); } void Stop() { analogWrite(in1, 0); analogWrite(in2, 0); analogWrite(in3, 0); analogWrite(in4, 0); } void brakeOn() { //Here's the future use: an electronic braking system! // read the pushbutton input pin: buttonState = command; // compare the buttonState to its previous state if (buttonState != lastButtonState) { // if the state has changed, increment the counter if (buttonState == 'S') { if (lastButtonState != buttonState) { digitalWrite(in1, HIGH); digitalWrite(in2, HIGH); digitalWrite(in3, HIGH); digitalWrite(in4, HIGH); delay(brakeTime); Stop(); } } // save the current state as the last state, //for next time through the loop lastButtonState = buttonState; } } void brakeOff() { }
@BhavanaB-x5b
@BhavanaB-x5b 24 күн бұрын
The code is right or wrong
@mohamadfazlee3328
@mohamadfazlee3328 2 жыл бұрын
What the name of the small board that ? At minute 1.23
@passiontechklm
@passiontechklm 2 жыл бұрын
You means Bluetooth?
@titoo7469
@titoo7469 Жыл бұрын
HC-05
@titoo7469
@titoo7469 Жыл бұрын
Great Content 👍☺️
@passiontechklm
@passiontechklm Жыл бұрын
Thank you 🙌
@melodybrown7087
@melodybrown7087 8 ай бұрын
does not work
@wilvermagana4771
@wilvermagana4771 5 ай бұрын
Excelente Encontré mi error con tu explicación
@vincentkipkurui1027
@vincentkipkurui1027 4 ай бұрын
Name the components
@arduinoprojets4718
@arduinoprojets4718 9 ай бұрын
you gave us a different code from the project
@karimkarim-xl6rd
@karimkarim-xl6rd 2 жыл бұрын
EXPL RX TX
How to control a DC motor with L298N driver and Arduino Uno
9:50
WOW! Amazing DIY Bluetooth Robot Car - Control with Your Smartphone
6:43
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,5 МЛН
怎么能插队呢!#火影忍者 #佐助 #家庭
00:12
火影忍者一家
Рет қаралды 14 МЛН
Make A Bluetooth Control Car using arduino UNO
9:01
AtriBOT
Рет қаралды 2 М.
COMO MONTAR UM ROBO COM CÂMERA | ESP32 CAM | Robô Espião
13:02
Download fritzing for free
6:04
Passion Tech KLM
Рет қаралды 3,9 М.
How to control DC motor with L298N driver and Arduino
5:48
Circuit Magic
Рет қаралды 437 М.
Camera Car With Pan Tilt Control | ESP32Cam
11:57
hash include electronics
Рет қаралды 195 М.
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН