struct GpsStatus{
public:
int Day;//4
int Month;//4
int Year;//4
bool IsGpsCollected;//1
int Satellites;//4
String Latitude;//8
String Longitude;//8
};
What are these lines for?
Why not just use gStatus for the EEPROM.put() call too?
Just as the ones in my previous post, the following questions are not merely rhetorical. They are asked in order to be answered - each one of them.
Do you actually get the found event in console?
What do you get in console?
Have you tried checking the current state of your gStatus fields when the condition is not met?
What makes you think the EEPROM area you are reading from must be empty (filled with 0xFF bytes)?
Also, when using new you should also call delete when done with the object.
When your if() condition is met your fifthParticle.publish() call will violate the rate limit.
BTW, bool is not 1 byte (as your comment in the struct definition suggests) but 4 bytes (on a 32bit system that is).