How to Build a GPS Guided Robot - Part 6 - The Code

Поделиться
HTML-код
  • Опубликовано: 13 июл 2024
  • The Instructable is here - www.instructables.com/id/How-...
    How to Build a GPS Guided Robot Part 6
    In this Video I describe the Arduino Code and a little about how the code works and things to do and not to do when making changes to it.
    You can Download the Cellphone App from MIT App Inventor here
    ai2.appinventor.mit.edu/?local...
    or you can search for it in the Gallery under "GPS Guided Robot"
    The Arduino code can be downloaded from Github Here
    github.com/mkconer/GPSRobot
    You will also need to download and install several libraries referred to in the code and the Videos and Instructable
    This builds upon a Bluetooth Robot that I made in a previous RUclips Video
    You can find the Instructable for it here.
    www.instructables.com/id/Buil...
  • РазвлеченияРазвлечения

Комментарии • 90

  • @bogdanmihai82
    @bogdanmihai82 4 года назад +1

    Thank you so much for this series, it's verry helpfull.

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

    Thank you i will try that i will let you know

  • @soumitradey8208
    @soumitradey8208 5 лет назад +1

    Excellent project

    • @EZtech
      @EZtech  5 лет назад +1

      Thanks

    • @limitless2.011
      @limitless2.011 3 года назад +1

      @@EZtech @EZtech I need your help. I have done everything step by step. I have made the circuit, and calibrated the compass, and uploaded the code. And did everything which you told in this video. But the problem is that, I never got any output whenever I press any button in the app. Even the connection is proper and code is properly uploaded, also compass has been calibrated perfectly but nothing works with the app, whenever I press any button.

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

      @@EZtech I have an error, ' manual ' was not declared on this scope. Tell me how to solve this error?

  • @3dprintingwithdanny31
    @3dprintingwithdanny31 4 года назад +2

    I’m using arduino uno on a rc car and I’m basically wanting a return to home function. instead of using Bluetooth is there a way I can set an array with cords like (30.0000,-80.0000) that will guide itself to from what ever cords the rc car is at to the cords Ive set in an array. I have a compass and using neo-6m gps module with Hobbyking 10a esc, ultrasonic sensor and arduino uno. I’ll be happy to share my code I have for autonomous collision avoiding rc car if you would like. Just looking for an upgrade. Also thanks for your code, you made it very easy to understand!

  • @Mrackal1
    @Mrackal1 6 лет назад +1

    Love the series of videos, how can I change this code to work with IR remote and receiver instead of the Bluetooth module?

    • @explainplease2286
      @explainplease2286 5 лет назад

      Sir..plz tell me...is given code is really working??

    • @simoncyber2049
      @simoncyber2049 3 года назад +2

      The code isn't working, to many errors

  • @long4723
    @long4723 3 года назад +2

    i dont know error, please help me
    'class HMC5883L' has no member named 'begin'
    // Compass
    Wire.begin(); // Join I2C bus used for the HMC5883L compass
    compass.begin(); // initialize the compass (HMC5883L)
    compass.setRange(HMC5883L_RANGE_1_3GA); // Set measurement range
    compass.setMeasurementMode(HMC5883L_CONTINOUS); // Set measurement mode
    compass.setDataRate(HMC5883L_DATARATE_30HZ); // Set data rate
    compass.setSamples(HMC5883L_SAMPLES_8); // Set number of samples averaged
    compass.setOffset(0,0);

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

    I have one doubt, can't we use ardupilot?it already has mission planning?well stable code.

  • @kilorenmai541
    @kilorenmai541 3 года назад +1

    hello I would replace motor by a rf 433mhf arduino module how I should take thank's in advance

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

    sir..i can do build coding and MIT apps base on you guied from you video 1-6.tq so much..but.now i have problem how to do set waypoint..please help me sir..tq

  • @paulsharon4174
    @paulsharon4174 Год назад +1

    @EZtech I got an error , 'manual' was not declared in this scope. I selected the port and board. But I can't solve this error. Please say how to solve this?

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

    Which sketch to finally upload to the arduino mega? There are so many sletches here. Please help.

  • @user-wl2ue6ow6h
    @user-wl2ue6ow6h Год назад

    how the destination gps location is obtained by robot? i read the code multiple times and couldnt find the details. My doubt is , in the set waypoint array the gps location of robot is saved. but how did thatmake sense because the destination data should be obtained from the android device right?

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

    @Eztech How are you running multiple sketches in a single sketch? Please help as I am new to this.

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

    While I am compiling the code is showing Serial1 is not defined in the scope

  • @Benz93x
    @Benz93x 4 года назад +1

    I honestly do not understand how I am getting errors in the bluetooth code, compass etc without touching anything in the code? Main code says 'startup' was not declared in this scope........ Why?

  • @limitless2.011
    @limitless2.011 3 года назад +2

    @EZtech I need your help. I have done everything step by step. I have made the circuit, and calibrated the compass, and uploaded the code. And did everything which you told in this video. But the problem is that, I never got any output whenever I press any button in the app. Even the connection is proper and code is properly uploaded, also compass has been calibrated perfectly but nothing works with the app, whenever I press any button.

    • @Alex-mm5zj
      @Alex-mm5zj 3 года назад

      did you solve the problem?

    • @Alex-mm5zj
      @Alex-mm5zj 3 года назад

      i have the same issue, and the problem seems to be at compass, if i comment the line for comapss the bluetooth app is working, what kind of compass are you using?

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

      Yeah I have same problem here

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

      Can you share your code ?

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

      @@simoncyber2049 Hi, just picked up your comment, I have two bots working ok from a couple of years ago, tried to build a new set which like you would not run. Just changed the compass mast from the old one and guess what, it works! all are GY-273, must be the compass itself. Will order another and hope.

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

    Please tell how to set waypoints

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

    I'm having a problem with the app itself. The control for movement like forward, reverse, left, and right are not working. The other buttons such as connect bt and disconnect works just fine. I hope someone can help

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

    Has anyone encountered this issue? when I press the gps info button it shows me that my location is 5000+ km away from the robot. Any solution?

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

    'class HMC5883L' has no member named 'begin'
    what must i do? please help

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

    Anyone have updated the code ? Please share it

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

    what is the world is that getGPS and getCompass coming from? i cant seem to see those functions in the libraries what am i missing?

    • @mj-m94
      @mj-m94 4 года назад

      They are defined as void in GPS_Compass.ino

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

    @EZtech. I get errors when uploading the code in audrino. Is that normal?

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

      No it's not normal, make sure you selected the Arduino Mega board in the IDE, and installed all the necessary Libraries?

  • @shivamdeshmukh3612
    @shivamdeshmukh3612 10 месяцев назад

    Can we use Arduino Uno instead of mega

  • @navadeep.ganesh
    @navadeep.ganesh 4 года назад

    how to upload all those codes to arduino?
    only 1 is allowed a t a time.

  • @daisyfernandez7870
    @daisyfernandez7870 6 лет назад

    Can i have the link to download the I2Cdev library? I already have one but not sure if is the right one, I'm trying to compile but gives me an error "the folder doesn't have a valid library", also I'm using an arduino nano.

    • @EZtech
      @EZtech  6 лет назад

      Daisy Fernández It will not work with the nano, it doesn't have enough serial ports. Select the Arduino mega and try compiling again.

    • @daisyfernandez7870
      @daisyfernandez7870 6 лет назад

      EZtech it doesn't work "fatal error: I2Cdev.h: No such file or directory
      #include
      Invalid library"

    • @EZtech
      @EZtech  6 лет назад

      Daisy Fernández Try commenting out the include statement with I2C in it and recompile the code, I am trying to remember if this library was needed at all. If for some reason it doesn't work here is a link to the library... github.com/jrowberg/i2cdevlib

    • @daisyfernandez7870
      @daisyfernandez7870 6 лет назад

      EZtech didn't work out, gives me the same error but with the HMC5883L library. I downloaded the library from the link and nothing 🤔 i tried to copy the library's inside of the arduino libraries folder but it didn't work out, have you ever had this kind of problem?

    • @EZtech
      @EZtech  6 лет назад +2

      Daisy Fernández The hmc5883l library that is listed inside the Arduino ide auto install library is the wrong one. You will need to manually delete any hmc5883l libraries that are not the one I refer to; otherwise, you will get compile errors. Be sure to delete any other compass libraries.

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

    Dear sir, i assembled the robot exactly as your instructions , i uploaded the code and everything but nothing works with the app, i connected the bluetooth and everything but nothing in the controls working what could be the issue?

    • @Alex-mm5zj
      @Alex-mm5zj 3 года назад

      did you solve this problem?

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

      did you solve?

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

    We want to upload all the code

  • @ferasbukhari6643
    @ferasbukhari6643 4 года назад +1

    can i use it with arduino uno using only 2 motor with L298n driver ???

    • @EZtech
      @EZtech  4 года назад +1

      You could use the L298n, but you would need to change alot of the wiring and the code. The Arduino Mega is a must. It's much easier to build it as is and make modifications later.

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

      @@EZtech thanks

    • @navadeep.ganesh
      @navadeep.ganesh 4 года назад

      did you do with UNO?

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

      feras, did it work for you? I'm also trying to modify the code to use the L298n, but it doesn't work. Could you share your code? Thank you.

    • @limitless2.011
      @limitless2.011 3 года назад +1

      @@EZtech @EZtech I need your help. I have done everything step by step. I have made the circuit, and calibrated the compass, and uploaded the code. And did everything which you told in this video. But the problem is that, I never got any output whenever I press any button in the app. Even the connection is proper and code is properly uploaded, also compass has been calibrated perfectly but nothing works with the app, whenever I press any button.

  • @Amit-ih8mn
    @Amit-ih8mn 5 лет назад

    i have an error. it says " Startup was not declared in this scope" . what should i do?

    • @EZtech
      @EZtech  5 лет назад

      Did you select the Arduino Mega as your board? This will not work with the Uno or other boards

    • @navadeep.ganesh
      @navadeep.ganesh 4 года назад

      How did you upload all those pieces of code ? only 1 code can be uploaded at a time right?

    • @limitless2.011
      @limitless2.011 3 года назад +1

      @@EZtech @EZtech I need your help. I have done everything step by step. I have made the circuit, and calibrated the compass, and uploaded the code. And did everything which you told in this video. But the problem is that, I never got any output whenever I press any button in the app. Even the connection is proper and code is properly uploaded, also compass has been calibrated perfectly but nothing works with the app, whenever I press any button.

  • @811ash
    @811ash 5 лет назад

    The car receives GPS Signal however it doesn't follow the GPS no matter how much I try :/ What could be off?

    • @soumitradey8208
      @soumitradey8208 5 лет назад

      Have you completed this ? Thanks

    • @navadeep.ganesh
      @navadeep.ganesh 4 года назад

      How did you upload all those pieces of code ? only 1 code can be uploaded at a time right?

  • @rejasnambiar362
    @rejasnambiar362 10 месяцев назад

    Hello, Nice video, but there is an issue with me , compass settings is not been shown, How to install the i2cdev in Arduino uno it is showing error while installing the i2cdev in ide , In the app notification windows noting is been showed up after Pressing Set heading , Please give solution to this

    • @EZtech
      @EZtech  10 месяцев назад +1

      You really can't use the arduino uno. You really need need to use the mega; otherwise, the wiring and programming would need to be modified.

    • @rejasnambiar362
      @rejasnambiar362 10 месяцев назад

      Ok thanks for the reply , I also tried with Arduino mega

    • @rejasnambiar362
      @rejasnambiar362 10 месяцев назад

      With same , I only removed the ping sensor , rest all are same , without I2C can I do ? Is wire.h is sufficient, If I press the button "Forward" or "Reverse" in the app will the car going to move ?, In my case the car is not moving, mega has been used

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

    i had issue
    GPS_Guided_Robot:100:3: error: 'Serial1' was not declared in this scope
    Serial1.begin(9600); // Serial 1 is for Bluetooth communication - DO NOT MODIFY - JY-MCU HC-06 v1.40

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

    hello
    i was surfing the web and i found this project and is very interesting. i got all the parts necessary, but when i download the arduino code it get stuck on ''''''Startup' was not declared in this scope,,,,,, i even tried on the new arduino web editor
    can you please help
    thanks
    ps. i saw this at instructables.com/

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

      Are you sure you selected the Arduino Mega in the Arduino IDE under Tools/ Board? Also make sure you have all the program downloaded, you should see several tabs...Startup, Steering, Bluetooth, etc. Copy all the files from GitHub and place them in a single folder.

    • @navadeep.ganesh
      @navadeep.ganesh 4 года назад

      How did you upload all those pieces of code ? only 1 code can be uploaded at a time right?

    • @limitless2.011
      @limitless2.011 3 года назад +1

      @@EZtech @EZtech I need your help. I have done everything step by step. I have made the circuit, and calibrated the compass, and uploaded the code. And did everything which you told in this video. But the problem is that, I never got any output whenever I press any button in the app. Even the connection is proper and code is properly uploaded, also compass has been calibrated perfectly but nothing works with the app, whenever I press any button.

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

      @@limitless2.011 Just found a possible solution, On first page of program select out all "compass" items. reload and try bluetooth controller. Found the compass chip was blocking the run. (been trying to find the fault for a year!).

  • @prathameshthube4130
    @prathameshthube4130 5 лет назад

    Can I use this in arduino uno

    • @EZtech
      @EZtech  5 лет назад

      No, not really

    • @limitless2.011
      @limitless2.011 3 года назад +1

      @@EZtech @EZtech I need your help. I have done everything step by step. I have made the circuit, and calibrated the compass, and uploaded the code. And did everything which you told in this video. But the problem is that, I never got any output whenever I press any button in the app. Even the connection is proper and code is properly uploaded, also compass has been calibrated perfectly but nothing works with the app, whenever I press any button.

  • @alfredogallardo5917
    @alfredogallardo5917 5 лет назад

    I try to run your code but it tells me Serial1 not declared in this scope... and i dont know what to dooo, Someone can help me ??

    • @EZtech
      @EZtech  5 лет назад

      Alfredo Gallardo Are you using the Arduino mega? The code needs more than one serial port. Also, make sure you are selecting the Arduino Mega when compiling the code in the Arduino IDE.

    • @alfredogallardo5917
      @alfredogallardo5917 5 лет назад

      @@EZtech yeap, im using Arduino mega, selecting it in the sketch and the right port tooo, i dont know what its wrong. Im running the program with all the windows like you are doing in the video, please help me :C and thankyou for your answer

    • @EZtech
      @EZtech  5 лет назад

      Alfredo Gallardo Try commenting out the line of code... // #include I'm trying to remember if the software serial library is even needed. The GPS uses hardware serial for speed. Try commenting it out and see what happens.

    • @alfredogallardo5917
      @alfredogallardo5917 5 лет назад

      @@EZtech I do not know if you could try and compile the program, and send the program to alfredo0107.gallardo@gmail.com, it would help me a lot and thank you again for answering me.

    • @soumitradey8208
      @soumitradey8208 5 лет назад

      @@alfredogallardo5917 hiii! This is a great project. Need help. Am getting QMC5883 Magnetometer as HMC library doest not work. Although I used the QMC 5883 calibration but data is very unstable! Any help thanks a lot