Page 1 of 1

Another one asking for help with Wifi Alert

Posted: Wed Jun 10, 2015 11:31 am
by lucho
Hi everybody. I want to send a wifi alert when my AWC starts and when it finishes, and have been trying to adjust what I have seen others do to fit the bill.

When it starts, I want it to tell me the time, and the WL. When it moves from taking out water to taking in, I want it to tell me the time and the WL, and when it finishes the same.

This is what I have come up with, really appreciate any help:

Code: Select all

static WiFiAlert AWCstart

    char msg[30];
    char h[2];
    char m[2];
    char s[2];
  
    dtostrf((float) hour(), 2, 0, h);
    dtostrf((float) minute(), 2, 0, m);
    dtostrf((float) second(), 2, 0, s);
    sprintf(msg, "The+AWC+at+%s:%s:%s+has+started.+Water+level+at+%d%", h, m, s, ReefAngel.WaterLevel.GetLevel(3));
    AWCstart.Send(msg);

Re: Another one asking for help with Wifi Alert

Posted: Thu Jun 11, 2015 4:24 am
by lnevo
Your way past 30 characters. You need to make msg larger for one.