Errors compiling for Arduino Uno. Is my code faulty?

I haven't been able to compile my sketch for my arduino uno, I had replaced a bad one and thought my issues were over, but I guess not. is there something wrong with my code?

char auth = "blynk-token";

#define GPS_TX_PIN 6

#define BLUETOOTH_TX_PIN 10
#define BLUETOOTH_RX_PIN 11

#define MOTOR_A_EN_PIN 4
#define MOTOR_B_EN_PIN 5
#define MOTOR_A_IN_1_PIN 2
#define MOTOR_A_IN_2_PIN 3
#define MOTOR_B_IN_1_PIN 12
#define MOTOR_B_IN_2_PIN 13

// If one motor tends to spin faster than the other, add offset
#define MOTOR_A_OFFSET 20
#define MOTOR_B_OFFSET 0

// 'Declination Angle' to the compass, which is the 'Error' of the magnetic field in your location.
// Find yours here: http://www.magnetic-declination.com/
// Mine is: 13° 24' E (Positive), which is ~13 Degrees, or (which we need) 0.23 radians
#define DECLINATION_ANGLE 0.23f

// The offset of the mounting position to true north
// It would be best to run the /examples/magsensor sketch and compare to the compass on your smartphone
#define COMPASS_OFFSET 0.0f

// How often the GPS should update in MS
// Keep this above 1000
#define GPS_UPDATE_INTERVAL 1000

// Number of changes in movement to timeout for GPS streaming
// Keeps the cooler from driving away if there is a problem
#define GPS_STREAM_TIMEOUT 18

// Number of changes in movement to timeout for GPS waypoints
// Keeps the cooler from driving away if there is a problem
#define GPS_WAYPOINT_TIMEOUT 45

// Definitions (don't edit these)
struct GeoLoc {
float lat;
float lon;
};

Please post your FULL code (using the </> tag) and the FULL error.

Read the how to get the best from the forum post. Post your complete code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

I guess it is that :wink: As the others said, use code tags when posting code. The easiest is probably to use edit -> copy for forum in the IDE and post it in a reply.

I haven't been able to compile my sketch for my arduino uno, I had replaced a bad one and thought my issues were over, but I guess not. is there something wrong with my code?

here is the code:

#include <SoftwareSerial.h>

#include <TinyGPS.h>

#include <Blynk.h>

#include <Adafruit_HMC5883_U.h>

#include <Adafruit_Sensor.h>

#include <Wire.h>

char auth[] = "blynk-token";

#define GPS_TX_PIN 6

#define BLUETOOTH_TX_PIN 10
#define BLUETOOTH_RX_PIN 11

#define MOTOR_A_EN_PIN 4
#define MOTOR_B_EN_PIN 5
#define MOTOR_A_IN_1_PIN 2
#define MOTOR_A_IN_2_PIN 3
#define MOTOR_B_IN_1_PIN 12
#define MOTOR_B_IN_2_PIN 13

// If one motor tends to spin faster than the other, add offset
#define MOTOR_A_OFFSET 20
#define MOTOR_B_OFFSET 0

// You must then add your 'Declination Angle' to the compass, which is the 'Error' of the magnetic field in your location.
// Find yours here: http://www.magnetic-declination.com/
// Mine is: 13° 24' E (Positive), which is ~13 Degrees, or (which we need) 0.23 radians
#define DECLINATION_ANGLE 0.21f

// The offset of the mounting position to true north
// It would be best to run the /examples/magsensor sketch and compare to the compass on your smartphone
#define COMPASS_OFFSET 0.0f

// How often the GPS should update in MS
// Keep this above 1000
#define GPS_UPDATE_INTERVAL 1000

// Number of changes in movement to timeout for GPS streaming
// Keeps the cooler from driving away if there is a problem
#define GPS_STREAM_TIMEOUT 18

// Number of changes in movement to timeout for GPS waypoints
// Keeps the cooler from driving away if there is a problem
#define GPS_WAYPOINT_TIMEOUT 45

// Definitions (don't edit these)
struct GeoLoc {
  float lat;
  float lon;
};

// GPS
TinyGPS gps;

// Master Enable
bool enabled = false;

//WidgetTerminal terminal(V3);

// Serial components
SoftwareSerial bluetoothSerial(BLUETOOTH_TX_PIN, BLUETOOTH_RX_PIN);
SoftwareSerial nss(GPS_TX_PIN, 255);            // TXD to digital pin 6

/* Compass */
Adafruit_HMC5883_Unified mag = Adafruit_HMC5883_Unified(12345);

GeoLoc checkGPS() {
  Serial.println("Reading onboard GPS: ");
  bool newdata = false;
  unsigned long start = millis();
  while (millis() - start < GPS_UPDATE_INTERVAL) {
    if (feedgps())
      newdata = true;
  }
  if (newdata) {
    return gpsdump(gps);
  }

  GeoLoc coolerLoc;
  coolerLoc.lat = 0.0;
  coolerLoc.lon = 0.0;
  
  return coolerLoc;
}

// Get and process GPS data
GeoLoc gpsdump(TinyGPS &gps) {
  float flat, flon;
  unsigned long age;
  
  gps.f_get_position(&flat, &flon, &age);

  GeoLoc coolerLoc;
  coolerLoc.lat = flat;
  coolerLoc.lon = flon;

  Serial.print(coolerLoc.lat, 7); Serial.print(", "); Serial.println(coolerLoc.lon, 7);

  return coolerLoc;
}

// Feed data as it becomes available 
bool feedgps() {
  while (nss.available()) {
    if (gps.encode(nss.read()))
      return true;
  }
  return false;
}

// Killswitch Hook
BLYNK_WRITE(V1) {
  enabled = !enabled;
  
  //Stop the wheels
  stop();
}

// GPS Streaming Hook
BLYNK_WRITE(V2) {
  
  Serial.println("Received remote GPS: ");
  
  // Print 7 decimal places for Lat
  Serial.print(gps.getLat(), 7); Serial.print(", "); Serial.println(gps.getLon(), 7);

  GeoLoc phoneLoc;
  phoneLoc.lat = gps.getLat();
  phoneLoc.lon = gps.getLon();

  driveTo(phoneLoc, GPS_STREAM_TIMEOUT);
}

// Terminal Hook
BLYNK_WRITE(V3) {
  Serial.print("Received Text: ");
  Serial.println(param.asStr());

  String rawInput(param.asStr());
  int colonIndex;
  int commaIndex;
  
  do {
    commaIndex = rawInput.indexOf(',');
    colonIndex = rawInput.indexOf(':');
    
    if (commaIndex != -1) {
      String latStr = rawInput.substring(0, commaIndex);
      String lonStr = rawInput.substring(commaIndex+1);

      if (colonIndex != -1) {
         lonStr = rawInput.substring(commaIndex+1, colonIndex);
      }
    
      float lat = latStr.toFloat();
      float lon = lonStr.toFloat();
    
      if (lat != 0 && lon != 0) {
        GeoLoc waypoint;
        waypoint.lat = lat;
        waypoint.lon = lon;
    
        Serial.print("Waypoint found: "); Serial.print(lat); Serial.println(lon);
        driveTo(waypoint, GPS_WAYPOINT_TIMEOUT);
      }
    }
    
    rawInput = rawInput.substring(colonIndex + 1);
    
  } while (colonIndex != -1);
}

void displayCompassDetails(void)
{
  sensor_t sensor;
  mag.getSensor(&sensor);
  Serial.println("------------------------------------");
  Serial.print  ("Sensor:       "); Serial.println(sensor.name);
  Serial.print  ("Driver Ver:   "); Serial.println(sensor.version);
  Serial.print  ("Unique ID:    "); Serial.println(sensor.sensor_id);
  Serial.print  ("Max Value:    "); Serial.print(sensor.max_value); Serial.println(" uT");
  Serial.print  ("Min Value:    "); Serial.print(sensor.min_value); Serial.println(" uT");
  Serial.print  ("Resolution:   "); Serial.print(sensor.resolution); Serial.println(" uT");  
  Serial.println("------------------------------------");
  Serial.println("");
  delay(500);
}

#ifndef DEGTORAD
#define DEGTORAD 0.0174532925199432957f
#define RADTODEG 57.295779513082320876f
#endif

float geoBearing(struct GeoLoc &a, struct GeoLoc &b) {
  float y = sin(b.lon-a.lon) * cos(b.lat);
  float x = cos(a.lat)*sin(b.lat) - sin(a.lat)*cos(b.lat)*cos(b.lon-a.lon);
  return atan2(y, x) * RADTODEG;
}

float geoDistance(struct GeoLoc &a, struct GeoLoc &b) {
  const float R = 6371000; // km
  float p1 = a.lat * DEGTORAD;
  float p2 = b.lat * DEGTORAD;
  float dp = (b.lat-a.lat) * DEGTORAD;
  float dl = (b.lon-a.lon) * DEGTORAD;

  float x = sin(dp/2) * sin(dp/2) + cos(p1) * cos(p2) * sin(dl/2) * sin(dl/2);
  float y = 2 * atan2(sqrt(x), sqrt(1-x));

  return R * y;
}

float geoHeading() {
  /* Get a new sensor event */ 
  sensors_event_t event; 
  mag.getEvent(&event);

  // Hold the module so that Z is pointing 'up' and you can measure the heading with x&y
  // Calculate heading when the magnetometer is level, then correct for signs of axis.
  float heading = atan2(event.magnetic.y, event.magnetic.x);

  // Offset
  heading -= DECLINATION_ANGLE;
  heading -= COMPASS_OFFSET;
  
  // Correct for when signs are reversed.
  if(heading < 0)
    heading += 2*PI;
    
  // Check for wrap due to addition of declination.
  if(heading > 2*PI)
    heading -= 2*PI;
   
  // Convert radians to degrees for readability.
  float headingDegrees = heading * 180/M_PI; 

  // Map to -180 - 180
  while (headingDegrees < -180) headingDegrees += 360;
  while (headingDegrees >  180) headingDegrees -= 360;

  return headingDegrees;
}

void setSpeedMotorA(int speed) {
  digitalWrite(MOTOR_A_IN_1_PIN, LOW);
  digitalWrite(MOTOR_A_IN_2_PIN, HIGH);
  
  // set speed to 200 out of possible range 0~255
  analogWrite(MOTOR_A_EN_PIN, speed + MOTOR_A_OFFSET);
}

void setSpeedMotorB(int speed) {
  digitalWrite(MOTOR_B_IN_1_PIN, LOW);
  digitalWrite(MOTOR_B_IN_2_PIN, HIGH);
  
  // set speed to 200 out of possible range 0~255
  analogWrite(MOTOR_B_EN_PIN, speed + MOTOR_B_OFFSET);
}

void setSpeed(int speed)
{
  // this function will run the motors in both directions at a fixed speed
  // turn on motor A
  setSpeedMotorA(speed);

  // turn on motor B
  setSpeedMotorB(speed);
}

void stop() {
  // now turn off motors
  digitalWrite(MOTOR_A_IN_1_PIN, LOW);
  digitalWrite(MOTOR_A_IN_2_PIN, LOW);  
  digitalWrite(MOTOR_B_IN_1_PIN, LOW);
  digitalWrite(MOTOR_B_IN_2_PIN, LOW);
}

void drive(int distance, float turn) {
  int fullSpeed = 230;
  int stopSpeed = 0;

  // drive to location
  int s = fullSpeed;
  if ( distance < 8 ) {
    int wouldBeSpeed = s - stopSpeed;
    wouldBeSpeed *= distance / 8.0f;
    s = stopSpeed + wouldBeSpeed;
  }
  
  int autoThrottle = constrain(s, stopSpeed, fullSpeed);
  autoThrottle = 230;

  float t = turn;
  while (t < -180) t += 360;
  while (t >  180) t -= 360;
  
  Serial.print("turn: ");
  Serial.println(t);
  Serial.print("original: ");
  Serial.println(turn);
  
  float t_modifier = (180.0 - abs(t)) / 180.0;
  float autoSteerA = 1;
  float autoSteerB = 1;

  if (t < 0) {
    autoSteerB = t_modifier;
  } else if (t > 0){
    autoSteerA = t_modifier;
  }

  Serial.print("steerA: "); Serial.println(autoSteerA);
  Serial.print("steerB: "); Serial.println(autoSteerB);

  int speedA = (int) (((float) autoThrottle) * autoSteerA);
  int speedB = (int) (((float) autoThrottle) * autoSteerB);
  
  setSpeedMotorA(speedA);
  setSpeedMotorB(speedB);
}

void driveTo(struct GeoLoc &loc, int timeout) {
  nss.listen();
  GeoLoc coolerLoc = checkGPS();
  bluetoothSerial.listen();

  if (coolerLoc.lat != 0 && coolerLoc.lon != 0 && enabled) {
    float d = 0;
    //Start move loop here
    do {
      nss.listen();
      coolerLoc = checkGPS();
      bluetoothSerial.listen();
      
      d = geoDistance(coolerLoc, loc);
      float t = geoBearing(coolerLoc, loc) - geoHeading();
      
      Serial.print("Distance: ");
      Serial.println(geoDistance(coolerLoc, loc));
    
      Serial.print("Bearing: ");
      Serial.println(geoBearing(coolerLoc, loc));

      Serial.print("heading: ");
      Serial.println(geoHeading());
      
      drive(d, t);
      timeout -= 1;
    } while (d > 3.0 && enabled && timeout>0);

    stop();
  }
}

void setupCompass() {
   /* Initialise the compass */
  if(!mag.begin())
  {
    /* There was a problem detecting the HMC5883 ... check your connections */
    Serial.println("Ooops, no HMC5883 detected ... Check your wiring!");
    while(1);
  }
  
  /* Display some basic information on this sensor */
  displayCompassDetails();
}

void setup()
{
  // Compass
  setupCompass();

  // Motor pins
  pinMode(MOTOR_A_EN_PIN, OUTPUT);
  pinMode(MOTOR_B_EN_PIN, OUTPUT);
  pinMode(MOTOR_A_IN_1_PIN, OUTPUT);
  pinMode(MOTOR_A_IN_2_PIN, OUTPUT);
  pinMode(MOTOR_B_IN_1_PIN, OUTPUT);
  pinMode(MOTOR_B_IN_2_PIN, OUTPUT);
  
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);

  //Debugging via serial
  Serial.begin(4800);

  //GPS
  nss.begin(9600);

  //Bluetooth
  bluetoothSerial.begin(9600);
  Blynk.begin(bluetoothSerial, auth);
}

// Testing
void testDriveNorth() {
  float heading = geoHeading();
  int testDist = 10;
  Serial.println(heading);
  
  while(!(heading < 5 && heading > -5)) {
    drive(testDist, heading);
    heading = geoHeading();
    Serial.println(heading);
    delay(500);
  }
  
  stop();
}

void loop()
{
  Blynk.run();
}

And here is the error I'm getting:
Arduino: 1.8.14 (Windows 10), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\2021josiahwright\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10814 -build-path C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911 -warnings=all -build-cache C:\Users\2021JO~1\AppData\Local\Temp\arduino_cache_888186 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\2021josiahwright\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10814 -build-path C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911 -warnings=all -build-cache C:\Users\2021JO~1\AppData\Local\Temp\arduino_cache_888186 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino

Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

Alternatives for SoftwareSerial.h: [SoftwareSerial@1.0]

ResolveLibrary(SoftwareSerial.h)

-> candidates: [SoftwareSerial@1.0]

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

Alternatives for TinyGPS.h: [TinyGPS@13.0.0]

ResolveLibrary(TinyGPS.h)

-> candidates: [TinyGPS@13.0.0]

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

Alternatives for Blynk.h: [Blynk@0.4.4]

ResolveLibrary(Blynk.h)

-> candidates: [Blynk@0.4.4]

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

Alternatives for Adafruit_HMC5883_U.h: [Adafruit_HMC5883_Unified@1.2.0]

ResolveLibrary(Adafruit_HMC5883_U.h)

-> candidates: [Adafruit_HMC5883_Unified@1.2.0]

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

Alternatives for Adafruit_Sensor.h: [Adafruit_Unified_Sensor@1.1.4]

ResolveLibrary(Adafruit_Sensor.h)

-> candidates: [Adafruit_Unified_Sensor@1.1.4]

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

Alternatives for Wire.h: [Wire@1.0]

ResolveLibrary(Wire.h)

-> candidates: [Wire@1.0]

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src\SoftwareSerial.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src\TinyGPS.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src\utility\BlynkDebug.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src\utility\BlynkHandlers.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src\utility\utility.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified\Adafruit_HMC5883_U.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor\Adafruit_Sensor.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.cpp" -o nul

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility\twi.c" -o nul

Generating function prototypes...

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\preproc\ctags_target_for_gcc_minus_e.cpp"

"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\preproc\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10814 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified" "-IC:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp" -o "C:\Users\2021JO~1\AppData\Local\Temp\arduino_build_441911\sketch\actualsketch.ino.cpp.o"

In file included from C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino:5:0:

C:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk\src/Blynk.h:15:2: warning: #warning "Please include a board-specific header file, instead of Blynk.h (see examples)" [-Wcpp]

#warning "Please include a board-specific header file, instead of Blynk.h (see examples)"

^~~~~~~

C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino: In function 'void BlynkWidgetWrite2(BlynkReq&, const BlynkParam&)':

actualsketch:131:20: error: 'class TinyGPS' has no member named 'getLat'

Serial.print(gps.getLat(), 7); Serial.print(", "); Serial.println(gps.getLon(), 7);

                ^~~~~~

actualsketch:131:73: error: 'class TinyGPS' has no member named 'getLon'

Serial.print(gps.getLat(), 7); Serial.print(", "); Serial.println(gps.getLon(), 7);

                                                                     ^~~~~~

actualsketch:134:22: error: 'class TinyGPS' has no member named 'getLat'

phoneLoc.lat = gps.getLat();

                  ^~~~~~

actualsketch:135:22: error: 'class TinyGPS' has no member named 'getLon'

phoneLoc.lon = gps.getLon();

                  ^~~~~~

C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino: In function 'void setup()':

actualsketch:398:3: error: 'Blynk' was not declared in this scope

Blynk.begin(bluetoothSerial, auth);

^~~~~

C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino:398:3: note: suggested alternative: 'Blynk_h'

Blynk.begin(bluetoothSerial, auth);

^~~~~

Blynk_h

C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino: In function 'void loop()':

actualsketch:419:3: error: 'Blynk' was not declared in this scope

Blynk.run();

^~~~~

C:\Users\2021josiahwright\Documents\Arduino\actualsketch\actualsketch.ino:419:3: note: suggested alternative: 'Blynk_h'

Blynk.run();

^~~~~

Blynk_h

Using library SoftwareSerial at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial

Using library TinyGPS at version 13.0.0 in folder: C:\Users\2021josiahwright\Documents\Arduino\libraries\TinyGPS

Using library Blynk at version 0.4.4 in folder: C:\Users\2021josiahwright\Documents\Arduino\libraries\Blynk

Using library Adafruit_HMC5883_Unified at version 1.2.0 in folder: C:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_HMC5883_Unified

Using library Adafruit_Unified_Sensor at version 1.1.4 in folder: C:\Users\2021josiahwright\Documents\Arduino\libraries\Adafruit_Unified_Sensor

Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

exit status 1

'class TinyGPS' has no member named 'getLat'

There are several error messages like this:

actualsketch:131:20: error: 'class TinyGPS' has no member named 'getLat'

check the TinyGPS library, perhaps those need to be capitalized or similar.

@joakeemw

TOPIC MERGED.

Could you take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.

This is very lengthy sketch . When writing code it is always worth writing a little bit then testing it , then going on .
Copying someone else’s code is always fraught with problems .

If you go through your error report you can always google a part you don’t under stand . The previous responder spotted the ( one of) problem(s) in your error report .

1 Like

A good point, but apparently a thing that can only be learned the hard way :wink:

1 Like