help me to make followmecooler

hello guys, I am now making follow me cooler made by 'HackerShack"

you can download the original version.

it’s been already two years, it is outdated, they quit their channel. so I cannot ask them for this problem.

the hmc5883 compass sensor is not usable so,

I am using Qmc5883 with MechaQMC5883 library.
changedcodecooler.ino

MechaQMC5883 qmc;
~~~~~~~~~~~~
float geoHeading() {
  int x,y,z;
  qmc.read(&x,&y,&z);
  float heading = atan2(y,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 = qmc.azimuth(&y, &x);

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

  return headingDegrees;

compile and upload was successful, however, nothing changes at all… :o
when I got it out for receiving GPS nothing has to appear on the terminal
can anybody help to check code?

// 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
// Me: Magnetic Declination: -8° 29' -0.14 rad
#define DECLINATION_ANGLE -0.14f

// 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

and I doubt this part maybe is the reason why. help me, please.

changedcodecooler.ino (8.03 KB)

CoolerDefinitions.h (1.48 KB)

TinyGPS.cpp (7.45 KB)

TinyGPS.h (5.74 KB)

MechaQMC5883.h (1.05 KB)

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

So, you have a bluetooth device and an nss connected to your Arduino. What the heck is a nss?

You DO understand that you can't listen to two SoftwareSerial instances at the same time, right?

Your code seems to depend on both software serial instances listening at the same time. That is NOT going to happen.

I never noticed that I can't listen to two SoftwareSerial instances at the same time.

thank @PaulS

if I have to change code can you recommend the references to correct this problem?

zero_to:
if I have to change code can you recommend the references to correct this problem?

Use an Arduino with multiple hardware serial ports such as a Mega, Due etc.

if I have to change code can you recommend the references to correct this problem?

Once you have changed to suitable hardware, that has multiple hardware serial ports, tell us what that hardware is, and then we can suggest how to change the code.

Since GPS is not sufficiently accurate outdoors and barely available at all indoors I recommend you switch to the RF/Ultrasonic method used by Ben Heckendorn for his robot luggage project.

(You have to sign up for a free membership to see the document.)