Это видео недоступно.
Сожалеем об этом.
Arduino SMART CAR | Bluetooth Mode+Obstacle avoiding+Voice Control
HTML-код
- Опубликовано: 27 окт 2022
- Hello Friends💙 ;
This is my Project 05 in Arduino.
In this video, we will learn how to make a multi-functional robot using the Arduino platform. That is, includes obstacle avoidance, Bluetooth control, and voice control functions.
OK enjoy it now.
Official Trailer ⏺:- • SMART CAR | Official T...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source code and circuit diagram 🔽
drive.google.c...
Password in This video included.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 MODES ▶
20:41 Bluetooth control
23:10 Obstacle avoiding
24:23 Voice control
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
For More Information 🔽
create.arduino...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Music 🔽
All music by NCS:- / nocopyrightsounds
Music provided by NoCopyrightSounds.
Thank you NCS.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to My channel, Like and Share this video
Help us in providing free knowledge.
Thanks for watching.❤
//----------------------------SMART_CAR_Project---------------------------------------//
//©hashan_sudeera
#include
#include
//-----------------------B------------------------------//
char value;
int speedCar=255;
boolean lightFront = false;
boolean lightBack = false;
boolean S_light = false;
//------------------------O-----------------------------//
int distance;
int Left;
int Right;
int L = 0;
int R = 0;
int L1 = 0;
int R1 = 0;
//----------Defines----------------//
#define Echo A0
#define Trig A1
#define S_motor 10
#define F_LED A4
#define B_LED A5
#define SL_LED A2
#define SR_LED A3
#define spoint 90
//-----------Motors-----------------//
Servo servo;
AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
AF_DCMotor motor3(3);
AF_DCMotor motor4(4);
void setup() {
Serial.begin(9600);
pinMode(Trig,OUTPUT);//Trig A1
pinMode(Echo,INPUT);//Echo A0
pinMode(F_LED,OUTPUT);//F_LED A4 pin
pinMode(B_LED,OUTPUT);//B_LED A5 pin
pinMode(SL_LED,OUTPUT);//SL_LED A2 pin
pinMode(SR_LED,OUTPUT);//SR_LED A3 pin
servo.attach(S_motor);
}
void loop() {
//-----------------Change_Mode----------------//
blutooth_mode();
//obstacle_mode();
//voice_control();
}
//---------------------------Blutooth_Mode---------------------------//
void blutooth_mode(){
if (Serial.available() > 0) {
value = Serial.read();
Stop(); //Initialize with motors stopped.
if (lightFront) {digitalWrite(F_LED, HIGH);
}
if (!lightFront) {digitalWrite(F_LED, LOW);
}
if (lightBack) {digitalWrite(B_LED, HIGH);
}
if (!lightBack) {digitalWrite(B_LED, LOW);
}
if (S_light) {digitalWrite(SL_LED, HIGH);
digitalWrite(SR_LED, HIGH);
}
if (!S_light) {digitalWrite(SL_LED, LOW);
digitalWrite(SR_LED, LOW);
}
switch (value) {
case 'F':forward();break;
case 'B':backward();break;
case 'L':left();break;
case 'R':right();break;
case 'I':forwardRight();break;
case 'G':forwardLeft();break;
case 'J':backwardRight();break;
case 'H':backwardLeft();break;
case 'S':Stop();break;
case '0':speedCar = 75;break;
case '1':speedCar = 100;break;
case '2':speedCar = 125;break;
case '3':speedCar = 150;break;
case '4':speedCar = 175;break;
case '5':speedCar = 200;break;
case '6':speedCar = 220;break;
case '7':speedCar = 230;break;
case '8':speedCar = 240;break;
case '9':speedCar = 250;break;
case 'q':speedCar = 255;break;
case 'W':lightFront = true;break;
case 'w':lightFront = false;break;
case 'U':lightBack = true;break;
case 'u':lightBack = false;break;
case 'X':S_light = true;break;
case 'x':S_light = false;break;
}}
}
//------------------------Obstacle_Mode------------------------------//
void obstacle_mode(){
distance = ultrasonic();
if (distance R) {
O_left();
delay(500);
Stop();
delay(200);
}
} else {
forward();
}
}
//-------------------------Voice_Control-----------------------------//
void voice_control(){
if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
if (value == '^') {
forward();
digitalWrite(SL_LED, HIGH);
digitalWrite(SR_LED, HIGH);
} else if (value == '-') {
backward();
} else if (value == '') {
R = rightsee();
servo.write(spoint);
if (R >= 10 ) {
O_right();
delay(500);
Stop();
} else if (R < 10) {
Stop();
}
} else if (value == '*') {
Stop();
}
} else if (value == '!') {
{digitalWrite(F_LED, HIGH);
}
} else if (value == '@') {
{digitalWrite(F_LED, LOW);
}
} else if (value == '+') {
{digitalWrite(B_LED, HIGH);
}
} else if (value == '_') {
{digitalWrite(B_LED, LOW);
}
}
}
//-------------------------Ultrasonic----------------------------------//
int ultrasonic(){
digitalWrite(Trig,LOW);
delayMicroseconds(4);
digitalWrite(Trig,HIGH);
delayMicroseconds(10);
digitalWrite(Trig,LOW);
long t = pulseIn(Echo,HIGH);
long cm= t / 29/ 2;
return cm;
}
void forward()
{
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
motor4.setSpeed(speedCar);
forwardview();
}
void backward()
{
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
motor4.setSpeed(speedCar);
digitalWrite(B_LED,HIGH);
}
void left()
{
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
motor4.setSpeed(speedCar);
digitalWrite(SL_LED, HIGH);
leftview();
}
void O_left()
{
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
motor4.setSpeed(speedCar);
digitalWrite(SL_LED, HIGH);
}
void right()
{
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
motor4.setSpeed(speedCar);
digitalWrite(SR_LED, HIGH);
rightview();
}
void O_right()
{
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
motor4.setSpeed(speedCar);
digitalWrite(SR_LED, HIGH);
}
void forwardRight()
{
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(RELEASE);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
}
void forwardLeft()
{
motor1.run(RELEASE);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor4.setSpeed(speedCar);
}
void backwardRight()
{
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(RELEASE);
motor4.run(BACKWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor4.setSpeed(speedCar);
digitalWrite(B_LED,HIGH);
}
void backwardLeft()
{
motor1.run(BACKWARD);
motor2.run(RELEASE);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
motor1.setSpeed(speedCar);
motor2.setSpeed(speedCar);
motor3.setSpeed(speedCar);
digitalWrite(B_LED,HIGH);
}
void Stop()
{
motor1.run(RELEASE);
motor2.run(RELEASE);
motor3.run(RELEASE);
motor4.run(RELEASE);
}
int rightsee(){
servo.write(20);
delay(500);
Left = ultrasonic();
return Left;
}
int leftsee(){
servo.write(180);
delay(500);
Right = ultrasonic();
return Right;
}
int leftview(){
servo.write(180);
}
int rightview(){
servo.write(20);
}
int forwardview(){
servo.write(spoint);
}
Please can you send the code because it is not possible to copy the code from the comments
@@ibrahimghgh4307 you can copy it
Bhai mujhe ye aap copy kar ke bhej do n plz bhai
Ela super bn 🔥❤️
Thanks Brother 💙
බුදු සරණයි මගේ පුතේ හොඳ ලස්සන වටින වැඩක්❤
සුපිරි bm 🔥❤️
Thanks Brother 💙
Very amazing and very creative 😊
Thank You Little Sis..😊♥️.
the file needs password to extract
what shall i do
New sub my bro, i love this car
Thanks Bro💙
Superb✨
Thanks Brother 💙
supiri ban
Thanks, Brother 💙
Well done bro❤
Hello. I have problems to download de arduino code and the schematic. How can I do it?
Sir I just want to ask one thing... for every different mode we have to upload the code every time...one by one...Is this possible that we can upload the code once to arduino uno and it follows the 3 methods (modes) which are bluetooth control, obstacle avoiding, voice control.
Even I have the same question to be asked and can we just connect 2 motors insted of 4 motors??
yep. we can switch between modes using the push button.I'm try it but not work.
You can try it.
@@sankethraosrcreations3676 yes can.
Sir please how much is the total of all the parts
Which button
Can you tell me what command do you use to make your car's sensors turn in the direction you control?
What if I activate Bluetooth mode and obstacle mode at the same time, does the car work in both ways?
Please 🥺🙏 give the code description please
Sir which you using for controlling car?
Maru maru ❤️😍
Brother💙
hi, your circuit diagram is not able to open, can you resend in pdf form not in google drive.
Good job brother ❤️❤️
Thanks Brother 💙
how can i add ir sensor for line follower and the code needed
bro at the second line of the code error is there can you verify it send the new code
yes bro...there was an error
Vai yeah kam nahi ho raha...servo ka library to inshtall kya je lekin firbhi yeah ho nahi raha....plz help kijiye vai ...servo motor ka librery file dijiye
Vai servo ka library file dijiye plz
Bro how to download your program it's only shows picture of circuit diagram
What software do you use for voice control?
Arduino bluecontrol.
@@hashansudeera7472 if i use motor driver shield l298n instead of l293d, can i do like you?
@@leewa1778 can't brother..
@@hashansudeera7472 Can you guide me how to wire the led bulbs? I don't know this part very well.
@@leewa1778 download circuit diagram in the discription bro..
Can I implement three things simultaneously?
How can I change car speed specified in this code??? Please reply
What's the name of the app you're using for voice control mode
What's the difference between HC -5 AND HC -6
Bro whats the bo.motor rpm you used
HELLO HARSHAN CAN U TELL ME WHAT IS AN F -LED AND A B- LED , DO WE HAVE TO MAKE IT OR DO WE GET IT AT A ELECTRONIC STORE PLS REPLIE AND BY THE WAY AWESOME PROJECT
F LED -Front led
B LED -Back led
We can make it bro.
@@hashansudeera7472 thanks bro
@@TechandTravels45 you are welcome bro.
Hola me puedes decir que materiales usas por favor es para la escuela
Brother file to download ki lekin file open karne ke liye password maang raha he
Can i do this without led? Pls reply
Hello sir, I am getting a "Undeclared Motor1 " statement, how to fix that..??
include afmotor library bro.
ruclips.net/video/0Ih1O0Fqwfw/видео.html
Thank you so much!
💙
Good Work brother..💪
Thanks, Brother 💙
Hi bro can u tell me how to download AF motor library and how to make the F led and the B led pls and also can u tell me if i can make the arduino do all the three programs with only one arduino
Thanks
ruclips.net/video/VvE4KLt49OM/видео.html watch this video you can Download AF motor library.
Download the Circuit diagram in the description
It's good broo 🔥
Thanks bro
Thanku vai shhap mara car to op chal raha ha
Keya up ka ph number milyaga
Vai servo ka library file dijiye plz
Super❤️
Thanks Brother 💙
so amazing
Thank you.💙
My right is not working @@hashansudeera7472
Suberb😮
Bro, when will a new video come, I have been waiting for a long time ..... 🤤❣️❣️❣️
A New video coming soon brother.Thank you❤
sir error is coming in uploading code
avr dude:sktr500...........
pleaser help me please
Check your connections bro
@@hashansudeera7472 sir checked multiple times .i have made same but it is not working even after uploading the code the light of the motor driver glow only when connected to laptop when i remove cable it stops glowing . Even after switching the switch on not working .Please help me i have science exhibition next week .i am very tensed and worried please
Bro mera to cell dalen ke baad on hi ni ho rha
Thanks bro
Good Job brother
Thanks,Brother 💙
Thanks Brother 💙
Good 😊
Thank You💙
Subrice done! Brother. 🤩
Thanks Brother 😍💙
how must Total cost ?
USD 27.50 - in Sri lanka.
Guys password : smartcar
AF motor error or sarvo h motor error please help me
include afmotor library bro.
ruclips.net/video/0Ih1O0Fqwfw/видео.html
It is not working
thank you for my help
Welcome bro💙
hello, can I add esp32 wifi cam module on this?
Tx and RX pin required esp32 wifi cam module.
We used the Tx and RX pins for the Bluetooth module.
Therefore, it is difficult to include in this
@@hashansudeera7472 so the option is to remove bluetooth for you to be able to put esp32 wifi cam and just control it via wifi? or do you think we can put additional module like L298 so we can put the esp32?
@@jocar3665 your first option is so great
SOURCE CODE WILL BE NOT BE OPEN
maine aisa hi robot Banaya usmein Mujhko dikkat ja rahi hai
Bro i made this car but it not working
check out pin connections, bro.
Hi bro can u tell me how to put all the three codes on only one Arduino chip and how to function or rather shift the programmes from one and other pls
Thnx the most innovative project ever
//-----------------Change_Mode----------------//
//blutooth_mode();
//obstacle_mode();
//voice_control();
Bro,You can change mode if u remove the comment tag. you can activated mode.
Eg; //blutooth_mode(); ("//" remove)
Bro I understood that but I was just wondering if I want to put all three codes on the same Arduino chip and if we can shift between them?? Is it possible becuz i want all the three codes ??
@@anishaafonso4079 ruclips.net/video/CP6U9R3w3xg/видео.html
I'm try this.i'ts not worked bro.you try it
can u send the link of code?
the old link is not opening
drive.google.com/file/d/1QXRtIX0xaFtVVcxo762WKiGwMGq_7gsq/view
Yaar bhai password kya hai
Nahi batana to mana kar do bohot sare or bhi youtubers hai
Hi bro
Heloo..
Send your Instagram id
Can we use esp32 dev Instead of Arduinp UNO ?
bro how to make F-LED
download circuit diagram in the discription bro..
@@hashansudeera7472 password zip file?
@@gamingtechnicaltips6011 smartcar
password dedo
Password kya hai?
Digram
Password kha hai 😅😅
Sorry bro galat comment kar diya
Aap ne password de rakha hai
What's the app
Arduino IDE
9
please bhai ek madad kar do yaar
😊😊😊😊❤️❤️❤️❤️❤️🥰❤️❤️🥰❤️❤️🥰❤️❤️🥰❤️❤️🙏❤️🙏❤️🙏❤️❤️❤️🙏🥰❤️🥰🙏🙏🥰🥰🥰😒🥰🙏😒😒❤️🥰🥰🥰🙏🥰🙏🥰🥰🙏🙏🥰🥰🙏🙏❤️🥰🙏🥰🙏🥰🙏
💙
Bro unable to download code
drive.google.com/file/d/1QXRtIX0xaFtVVcxo762WKiGwMGq_7gsq/view try this one bro.
@@hashansudeera7472 when I click on that it shows copy file
@@karthikreddy1516 Download it and extract the zip file bro.
Chrome meinDesktop ko uncheck karo phir ho jaye ga.@@karthikreddy1516
what is passwords Mr?
smartcar
@@hashansudeera7472 thanks...
🇧🇷👏👏👍🇧🇷
ARQUIVOS ....tem SENHA.?
ok...smartcar
Password
smartcar
yeh mera number hai is per Mujhse contact kar lo
send me your number bro.(whatsapp)