Portable Air Quality Monitoring System with Setting Time Interval

Hi Guys, this is all my codes.

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

AIR_QUALITY_MONITORING_SYSTEM_COMPLETE.ino (10.5 KB)

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)

Which Arduino are you running this on? The pin numbers in the LiquidCrystal constructor suggests a Mega. The use of SoftwareSerial suggests that, if you are using a Mega, you aren't playing with a full deck.

Hi. Im using atmega644p

rajhefondo:
Hi. Im using atmega644p

Which has how many hardware serial ports?
Which supports pin change interrupts on which pins?

2 hardware serial, Serial, and Serial1.
"Two Programmable Serial USART" on PD0/1, PD2/3
PCINT supported on all pins.

http://www.atmel.com/devices/ATMEGA644P.aspx