Another one asking for help with Wifi Alert

Do you have a question on how to do something.
Ask in here.
Post Reply
lucho
Posts: 80
Joined: Fri Mar 02, 2012 8:11 am

Another one asking for help with Wifi Alert

Post 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);
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Another one asking for help with Wifi Alert

Post by lnevo »

Your way past 30 characters. You need to make msg larger for one.
Post Reply