NQ Hobby
NQ Hobby
  • Видео 1
  • Просмотров 154 984
Arduino Robot Car | Obstacle Avoiding Robot Car 2WD with Ultrasonic sensor and L298N Module
#arduino_car, #arduino_robot, #obstacle_avoiding_robot
- Arduino Obstacle Avoiding Robot Car 2WD Kit:
1 x Car chassis
2 x Car Wheels
2 x DC Gear Motor
2 x 20 line code disk
4 x Fasteners (high intensity black acrylic)
1 x Caster
1 x Four battery box
1 x Quality Rocker Switch
1 x V5 shield
1 x UNO R3
1 x SG90
1 x FPV
1 x L298N
usa.banggood.com/2WD-Avoidance-Tracking-Smart-Robot-Chassis-Car-Kit-With-Speed-Encoder-Ultrasonic-For-Arduino-UNO-R3-p-1124282.html?rmmds=detail-left-hotproducts__1&cur_warehouse=CN
- Wiring diagram and Arduino Sketch:
www.cs.columbia.edu/~sedwards/presentations/robot-car-instructions.pdf
- Music:
JJD - Sugar High Listen to the track here -
open.spotify.com/track/0voHEI164xgDQbMcoK08PX?...
Просмотров: 155 048

Видео

Комментарии

  • @booyaaaah1699
    @booyaaaah1699 3 месяца назад

    Code

  • @amanda_darmawan
    @amanda_darmawan 4 месяца назад

    WHERES THE CODE

  • @bouaouinasaid5143
    @bouaouinasaid5143 5 месяцев назад

    le code ne marche pas

  • @yusrashahbaz8608
    @yusrashahbaz8608 5 месяцев назад

    This is the correct code: #include <Servo.h> Servo servo; const int trigPin = 13; const int echoPin = 12; const int servoPin = 11; const int enAPin = 6; const int in1Pin = 7; const int in2Pin = 5; const int in3Pin = 4; const int in4Pin = 2; const int enBPin = 3; enum Motor { LEFT, RIGHT }; void go(enum Motor m, int speed) { digitalWrite(m == LEFT ? in1Pin : in3Pin, speed > 0 ? HIGH : LOW); digitalWrite(m == LEFT ? in2Pin : in4Pin, speed <= 0 ? HIGH : LOW); analogWrite(m == LEFT ? enAPin : enBPin, speed < 0 ? -speed : speed); } void testMotors() { static int speed[8] = {128, 255, 128, 0, -128, -255, -128, 0}; go(RIGHT, 0); for (unsigned char i = 0; i < 8; i++) go(LEFT, speed[i]), delay(200); for (unsigned char i = 0; i < 8; i++) go(RIGHT, speed[i]), delay(200); } unsigned int readDistance() { digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); unsigned long period = pulseIn(echoPin, HIGH); return period * 343 / 2000; } #define NUM_ANGLES 7 unsigned char sensorAngle[NUM_ANGLES] = {60, 70, 80, 90, 100, 110, 120}; unsigned int distance[NUM_ANGLES]; void readNextDistance() { static unsigned char angleIndex = 0; static signed char step = 1; distance[angleIndex] = readDistance(); angleIndex += step; if (angleIndex == NUM_ANGLES - 1) step = -1; else if (angleIndex == 0) step = 1; servo.write(sensorAngle[angleIndex]); } void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); digitalWrite(trigPin, LOW); pinMode(enAPin, OUTPUT); pinMode(in1Pin, OUTPUT); pinMode(in2Pin, OUTPUT); pinMode(in3Pin, OUTPUT); pinMode(in4Pin, OUTPUT); pinMode(enBPin, OUTPUT); servo.attach(servoPin); servo.write(90); go(LEFT, 0); go(RIGHT, 0); testMotors(); servo.write(sensorAngle[0]); delay(200); for (unsigned char i = 0; i < NUM_ANGLES; i++) readNextDistance(), delay(200); } void loop() { bool tooClose = false; readNextDistance(); for (unsigned char i = 0; i < NUM_ANGLES; i++) if (distance[i] < 300) tooClose = true; if (tooClose) { go(LEFT, -180); go(RIGHT, -80); } else { go(LEFT, 255); go(RIGHT, 255); } delay(50); }

    • @crypto4all878
      @crypto4all878 Месяц назад

      does it work dude?

    • @ramelsagao3691
      @ramelsagao3691 28 дней назад

      Thank you for sharing this code , it's working. Only this code help me , there's a lot of videos here in RUclips wasting my time to watch their code in description not work properly.

  • @user-hf4yw7oq3k
    @user-hf4yw7oq3k 7 месяцев назад

    Please send me the code

  • @the.exalter
    @the.exalter 7 месяцев назад

    Please send the codde

  • @farahmaad
    @farahmaad 9 месяцев назад

    😭😭😭Please I need the code very badly please give me the code

  • @boss64fun
    @boss64fun 9 месяцев назад

    please send me the code, greetings from germany

  • @user-rl6zm8ok1n
    @user-rl6zm8ok1n 11 месяцев назад

    bro can you share the code for controlling the motors

  • @SarimXhan
    @SarimXhan 11 месяцев назад

    BROTHER YOUR CODE IS SHOWING ERROR PLZ HELP AND SEND CODE AGAIN PLZ PZLPZLZPZLZPZLZ

  • @emadabuhagag222
    @emadabuhagag222 Год назад

    thank you

  • @worldVK1704
    @worldVK1704 Год назад

    Brrooooo..... Do kuch code diagram yrr...... ❤❤

  • @MADARA-mh4tp
    @MADARA-mh4tp Год назад

    ruclips.net/video/WSMFLkL-niY/видео.html

  • @dhanunjayagoud4717
    @dhanunjayagoud4717 Год назад

    What we need to do

  • @dhanunjayagoud4717
    @dhanunjayagoud4717 Год назад

    How to upload the code bro

  • @panzer737
    @panzer737 Год назад

    And the code?

  • @sergerobichaud7251
    @sergerobichaud7251 Год назад

    Hy can you send me the diagram and sketch please cause your link not working

  • @secorinjohnvincent8674
    @secorinjohnvincent8674 2 года назад

    can you put the codes of your obstacle avoidance robot please

  • @animmusiq5034
    @animmusiq5034 2 года назад

    code pls

  • @marialeliaguzmanramirez8046
    @marialeliaguzmanramirez8046 2 года назад

    EXCELENTE LO FELICITO JOVEN

  • @kiranrudra
    @kiranrudra 2 года назад

    This is really helpful vedio & I wan to try. I could find only instructions pdf but not Arduino Sketch. Could you please help me with sketch link please ?.

  • @takalvert
    @takalvert 2 года назад

    Nice one

  • @kmhooibg7577
    @kmhooibg7577 2 года назад

    oh my god no need coding? just install wire only??

  • @kellzbaker
    @kellzbaker 2 года назад

    Hey could you please give the code

  • @ahmedidress1287
    @ahmedidress1287 2 года назад

    Please type the code

  • @vipalsharma4120
    @vipalsharma4120 2 года назад

    Not open sketch

  • @ahmededufani
    @ahmededufani 2 года назад

    hey please send me the code

  • @mailahlaqui2926
    @mailahlaqui2926 2 года назад

    Yes, how to do the code pls

  • @creativetechz
    @creativetechz 2 года назад

    nice

  • @slinfinityprogrammer1000
    @slinfinityprogrammer1000 2 года назад

    hi .. My Chanel also about Arduino

  • @creative_lighting_ksg
    @creative_lighting_ksg 2 года назад

    Please bhai

  • @creative_lighting_ksg
    @creative_lighting_ksg 2 года назад

    Please bhai help

  • @creative_lighting_ksg
    @creative_lighting_ksg 2 года назад

    Mera arduino project pura nahin Ho Pa raha hai yaar Thodi bahut programming mein dikkat a rahi hai

  • @creative_lighting_ksg
    @creative_lighting_ksg 2 года назад

    Bhai mujhe aapse kuchh baat karna hai

  • @JabiloJoseJ
    @JabiloJoseJ 2 года назад

    Cool bro....that ultrasonic sensor holder idea is smart🔥🔥

  • @81LeoLeon
    @81LeoLeon 3 года назад

    Y el codigo??

  • @wathsalasithumini4231
    @wathsalasithumini4231 3 года назад

    Please contact with me...i need help you...

  • @JitendraSingh-vm6uw
    @JitendraSingh-vm6uw 3 года назад

    coding baj sakta hay

  • @iyadhmeid1687
    @iyadhmeid1687 3 года назад

    Bonjour, combien de temp j'ai cherché cette vidéo et maintenant je la trouver <<Qui cherche trouve>>

  • @jonathancabsag4195
    @jonathancabsag4195 3 года назад

    the code has errors!!!!!!!!!!

    • @slinfinityprogrammer1000
      @slinfinityprogrammer1000 2 года назад

      send it i will correct it

    • @alicelieselounebulisix9261
      @alicelieselounebulisix9261 2 года назад

      @@slinfinityprogrammer1000 here: #include <Servo.h> Servo servo; const int trigPin = 13; const int echoPin = 12; const int servoPin = 11; const int enAPin = 6; const int in1Pin = 7; const int in2Pin = 5; const int in3Pin = 4; const int in4Pin = 2; const int enBPin = 3; enum Motor { LEFT, RIGHT }; void go( enum Motor m, int speed) { digitalWrite (m == LEFT ? in1Pin : in3Pin , speed > 0 ? HIGH : LOW ); digitalWrite (m == LEFT ? in2Pin : in4Pin , speed <= 0 ? HIGH : LOW ); analogWrite(m == LEFT ? enAPin : enBPin, speed < 0 ? −speed : speed ); } void testMotors () { static int speed[8] = { 128, 255, 128, 0 , −128, −255, −128, 0}; go(RIGHT, 0); for (unsigned char i = 0 ; i < 8 ; i++) go(LEFT, speed[i ]), delay (200); for (unsigned char i = 0 ; i < 8 ; i++) go(RIGHT, speed[i ]), delay (200); } unsigned int readDistance () { digitalWrite ( trigPin , HIGH ); delayMicroseconds (10); digitalWrite ( trigPin , LOW ); unsigned long period = pulseIn ( echoPin, HIGH ); return period * 343 / 2000; } #define NUM ANGLES 7 unsigned char sensorAngle[NUM ANGLES] = { 60, 70, 80, 90, 100, 110, 120 }; unsigned int distance [NUM ANGLES]; void readNextDistance () { static unsigned char angleIndex = 0; static signed char step = 1; distance [angleIndex ] = readDistance (); angleIndex += step ; if (angleIndex == NUM ANGLES − 1) step = −1; else if (angleIndex == 0) step = 1; servo . write ( sensorAngle[angleIndex ] ); } void setup () { pinMode(trigPin , OUTPUT); pinMode(echoPin, INPUT); digitalWrite ( trigPin , LOW); pinMode(enAPin, OUTPUT); pinMode(in1Pin, OUTPUT); pinMode(in2Pin, OUTPUT); pinMode(in3Pin, OUTPUT); pinMode(in4Pin, OUTPUT); pinMode(enBPin, OUTPUT); servo . attach ( servoPin ); servo . write (90); go(LEFT, 0); go(RIGHT, 0); testMotors (); servo . write ( sensorAngle[0] ); delay (200); for (unsigned char i = 0 ; i < NUM ANGLES ; i ++) readNextDistance (), delay (200); } void loop () { readNextDistance (); for (unsigned char i = 0 ; i < NUM ANGLES ; i++) if ( distance [ i ] < 300) tooClose = 1; if (tooClose) { go(LEFT, −180); go(RIGHT, −80); } else { go(LEFT, 255); go(RIGHT, 255); } delay (50); }

    • @alicelieselounebulisix9261
      @alicelieselounebulisix9261 2 года назад

      @@slinfinityprogrammer1000 please help me correct it

  • @ghislainekegnon6627
    @ghislainekegnon6627 3 года назад

    hello! first of all congradulations for this work,it's so good!! please i want the code of obstacles avoiding car

  • @imanebezzaz8320
    @imanebezzaz8320 3 года назад

    hey! i wanna ask you cause i connected my arduino uno and this code didn't work

  • @emilioguevara
    @emilioguevara 3 года назад

    Code please

  • @chernoabdourahmanchaw7523
    @chernoabdourahmanchaw7523 3 года назад

    Thank you so much. Your video is one of the many that motivated me to build mine too ruclips.net/video/omdraron8xA/видео.html

  • @princegaming1462
    @princegaming1462 3 года назад

    bhai conection ka photo bhejo

  • @ancientgear7192
    @ancientgear7192 3 года назад

    Actually, you could remove the brown sticker from the frame and you would be left with a transparent one.

    • @hopelessnerd2482
      @hopelessnerd2482 2 года назад

      ohhh thanks buddy

    • @SALMANULFARISMM
      @SALMANULFARISMM 2 года назад

      How is that any youtube video. I can't remove that please reply

    • @ancientgear7192
      @ancientgear7192 2 года назад

      @@SALMANULFARISMM in the box I got the brown surface could be removed like a sticker. Maybe you got another version?

    • @SALMANULFARISMM
      @SALMANULFARISMM 2 года назад

      @@ancientgear7192 ok thank you

    • @SALMANULFARISMM
      @SALMANULFARISMM 2 года назад

      @@ancientgear7192 which Sensor sheild V5. To buy on amazon. Any link

  • @saikrishnabandiwar8916
    @saikrishnabandiwar8916 4 года назад

    Hi bro, can you send me the code of obstacles avoiding car

    • @slinfinityprogrammer1000
      @slinfinityprogrammer1000 2 года назад

      i can send

    • @luislloydmahusay235
      @luislloydmahusay235 2 года назад

      @@slinfinityprogrammer1000 can you send it to me too?

    • @slinfinityprogrammer1000
      @slinfinityprogrammer1000 2 года назад

      @@luislloydmahusay235 come to my channel .and come to FB from it

    • @luislloydmahusay235
      @luislloydmahusay235 2 года назад

      @@slinfinityprogrammer1000 can you kindly send the link instead? i already browse your FB and yt post, and i didn't see the coding of this project. thankyou

    • @gsm5480
      @gsm5480 2 года назад

      I need it too can u send the code here in the comments please?

  • @serdarsenol7307
    @serdarsenol7307 4 года назад

    That is not a sufficiant clip that shows which wire goes where and how to customize the software that corresponds the hardware☹️

    • @JoshDHD
      @JoshDHD 3 года назад

      ruclips.net/video/LSba-ByePao/видео.html

    • @JoshDHD
      @JoshDHD 3 года назад

      ruclips.net/video/LSba-ByePao/видео.html

  • @NguyenMinhuc-ns4wt
    @NguyenMinhuc-ns4wt 4 года назад

    code please

  • @KushanBro
    @KushanBro 4 года назад

    ruclips.net/video/WSMFLkL-niY/видео.html