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... Развлечения
Thank you so much for this series, it's verry helpfull.
Thank you i will try that i will let you know
Excellent project
Thanks
@@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.
@@EZtech I have an error, ' manual ' was not declared on this scope. Tell me how to solve this error?
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!
Can you share the code ?
Love the series of videos, how can I change this code to work with IR remote and receiver instead of the Bluetooth module?
Sir..plz tell me...is given code is really working??
The code isn't working, to many errors
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);
I have one doubt, can't we use ardupilot?it already has mission planning?well stable code.
hello I would replace motor by a rf 433mhf arduino module how I should take thank's in advance
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
@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?
Which sketch to finally upload to the arduino mega? There are so many sletches here. Please help.
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?
@Eztech How are you running multiple sketches in a single sketch? Please help as I am new to this.
While I am compiling the code is showing Serial1 is not defined in the scope
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?
@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.
did you solve the problem?
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?
Yeah I have same problem here
Can you share your code ?
@@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.
Please tell how to set waypoints
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
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?
'class HMC5883L' has no member named 'begin'
what must i do? please help
Anyone have updated the code ? Please share it
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?
They are defined as void in GPS_Compass.ino
@EZtech. I get errors when uploading the code in audrino. Is that normal?
No it's not normal, make sure you selected the Arduino Mega board in the IDE, and installed all the necessary Libraries?
Can we use Arduino Uno instead of mega
how to upload all those codes to arduino?
only 1 is allowed a t a time.
Hey, I too have the same question. Did u find how to do this?
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.
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.
EZtech it doesn't work "fatal error: I2Cdev.h: No such file or directory
#include
Invalid library"
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
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?
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.
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?
did you solve this problem?
did you solve?
We want to upload all the code
can i use it with arduino uno using only 2 motor with L298n driver ???
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.
@@EZtech thanks
did you do with UNO?
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.
@@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.
i have an error. it says " Startup was not declared in this scope" . what should i do?
Did you select the Arduino Mega as your board? This will not work with the Uno or other boards
How did you upload all those pieces of code ? only 1 code can be uploaded at a time right?
@@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.
The car receives GPS Signal however it doesn't follow the GPS no matter how much I try :/ What could be off?
Have you completed this ? Thanks
How did you upload all those pieces of code ? only 1 code can be uploaded at a time right?
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
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.
Ok thanks for the reply , I also tried with Arduino mega
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
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
how can i correct this issue
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/
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.
How did you upload all those pieces of code ? only 1 code can be uploaded at a time right?
@@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.
@@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!).
Can I use this in arduino uno
No, not really
@@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.
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 ??
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.
@@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
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.
@@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.
@@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