it shows 0 instead of 1 ?? for whatever mins or seconds or hours
What does this mean? The sample stuff you show presumably came from the print statements you show, so they are not printing 0 everywhere. Nor are they showing 1 everywhere.
2-->would like to know how to display my information every second or two seconds or every minute, right now it gives info every
Time: 10:8:1
Time: 10:8:3
Time: 10:8:5
Time: 10:8:6
Time: 10:8:8
Time: 10:8:9
The time is when the GPS fix was received. You can't make it receive fixes more often. You can print the fix data only when the minute value changes, if you want.
3--> the present time is 11 but it shows the GMT time how to change it
Move to somewhere else. The GPS only shows GMT time. You have to apply the correct offset for your time zone.
4--> I tried to understand, but couldn't
Can't help you there. I understand it, and I don't understand what you don't understand.
It's calling the encode() method of the TinyGPS instance, with the last character received from the GPS. That function returns true or false (true when the NMEA sentence is complete; false when it is not).
5--> What does the question mark stand for and why 6 in the end ?
The ? mark and : are the only ternary operator in C. It says to evaluate the expression before the ? and return the value before the : if the expression is true and the value after the : if the expression is false.
The expression then evaluates to:
Serial.print(flon, 6);
or
Serial.print(0.0, 6);
So, now you can see what the 6 is for, right?