Portable Air Quality Monitoring System with Setting Time Interval

Hi Guys, this is all my codes.
See Attach File, they are in functions

Our project is to gather data about air.

Our code logic is to first initialized SD card, next is to ask for the time interval to be put by the user, next is the GPS MODULE to initialize, next is to START/STOP the reading of the gathering data. :slight_smile:

we are having a problem though, because our GPS MODULE is having a bit of problem, in the early seconds or minutes when the GPS MODULE is not yet completely function well the code scenario that we want is working, but when the GPS MODULE now know the LOCATION, DATE and TIME, the time interval that the user set is not being followed anymore. and the PM SENSOR is having a negative value which should not be happening.

Summarization of My question now.

  1. How can we fix the time interval to be compatible with the GPS MODULE? that if the GPS MODULE is already functioning well it will still follow the time interval that the user inputted.
  2. How can we remove the negative value of the PM Sensor? we already have the decoupling. but still it is outputting negative, and we are thinking the GPS MODULE is also responsible of this.
  3. Lastly, is our flow of codes properly arrange?

thanks. god bless. i love you guys


GasSensor.ino (4.57 KB)

GPSDate.ino (460 Bytes)

GPSLocation.ino (423 Bytes)

GPSTime.ino (770 Bytes)

HOUR.ino (1.42 KB)

MINUTE.ino (1.56 KB)

PMSensor.ino (487 Bytes)

readbuttonstate.ino (156 Bytes)

SECOND.ino (1.36 KB)

TempSensor.ino (157 Bytes)