-1

I am working on a GPS autonomous robot using Arduino, HMC5883 compass, Adafruit GPS module and I have managed to sort of complete the coding for it and I tried compiling / verifying it and I get an error. It would be helpful if anyone could assist help me find out what I am doing wrong in my code as I have spent 2 days looking for what I have done wrong and if someone could suggest a better way of writing my code or even improving it here code I appreciate it. HERE IS MY CODE http://textuploader.com/drhfa

Error:

GPS_move_:468: error: unterminated argument list invoking macro "radians"
7
  • I assume the problem is with this line: Wire.send("A);
    – gre_gor
    Apr 25, 2017 at 17:24
  • it's not that I just corrected it and it still comes up with the error-@gre_gor Apr 25, 2017 at 17:27
  • There's numerous missing semicolons...
    – Majenko
    Apr 25, 2017 at 21:21
  • Also you seem to have a missing close bracket at differencelongitude = radians((longitudeWaypoint2 - (longitudeWaypoint1)); (or an excess open bracket)
    – Majenko
    Apr 25, 2017 at 21:23
  • And a colon instead of a semicolon here: turn_left():
    – Majenko
    Apr 25, 2017 at 21:24

1 Answer 1

2

I cannot compile because there are libraries missing. However, after auto-formatting the code I have this list of problems:

  • Many lines lack semicolons at the end (check your variable definitions near the top of the code)
  • You have an extra bracket in one of your radians() calls (the one that is giving the error I guess): differencelongitude = radians((longitudeWaypoint2 - (longitudeWaypoint1));
  • There is an unterminated string literal: Wire.send("A);
  • You have a colon instead of a semicolon: turn_left():

There may be more but as I cannot even begin to compile I cannot find them easily - also there may be similar errors in any included files you have created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.