ESP8266 Alarm Clock and error: ISO C++ forbids comparison between pointer and in

Hello,
I have a problem, when my alarm turns on, I have the unfortunate habit of snoozing it 102 times before waking up... Wich brings me to my next problem : I'm trying to code an alarm that would turn on each day at 7AM and turn off only if I push a button placed as far away as possible from my bed (let's say the coffee machine). I'm planning on using two ESP8266 (ESP-01), a piezo buzzer and a push button... The first ESP makes the buzzer buzz at 7AM, to turn it off, I push the button connected to the other ESP, as simple has that ( or at least I thought )

Trying to code the program while waiting for the components, but with my godness level coding of 0%, I'm having trouble writing it correctly !

I did these two with parts of codes I found and modified them a little bit.

The "server" ESP ( AKA The buzzy one )

#include <SPI.h>                   
#include <ESP8266WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>

byte buzzer = 2;
char ssid[] =                        "Alladin";
char pass[] =                     "FlYING CARPET";
WiFiServer server(80);              
IPAddress ip(192, 168, 0, 80);      
IPAddress gateway(192,168,0,1);     
IPAddress subnet(255,255,255,0);

const long utcOffsetInSeconds = 3600;


WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds);

char Hours = timeClient.getHours();
char Minutes = timeClient.getMinutes();
char Seconds = timeClient.getSeconds();

WiFiClient client;

void setup() {
Serial.begin(115200);                   // only for debug
  WiFi.config(ip, gateway, subnet);       // forces to use the fix IP
  WiFi.begin(ssid, pass);                 // connects to the WiFi router
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  server.begin();                         // starts the server
 }
void loop () {
  timeClient.update();

if (Hours=="07")
   (Minutes=="00")
   (Seconds=="00"); 
   {
       if (client) {
         if (client.connected()) {
            String request = client.readStringUntil('\r');
            while((request)==("He is still sleeping")) ;
               {
                Serial.println(".");
                String request = client.readStringUntil('\r');    
                client.flush();
                client.println("Waking him up\r"); 
                digitalWrite(buzzer, LOW);  
                delay(500);
                digitalWrite(buzzer, HIGH);
                delay(500);
          
               }
         
            if ((request)==("He is awake !"));
                {
                client.stop();
                digitalWrite(buzzer, LOW);
                }
            client.flush();
        }
    
   }
    
}
}

The error I get from the server ESP code

Arduino: 1.8.9 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Users\CARLITO\Downloads\DHT_server_02\DHT_server_02.ino: In function 'void loop()':

DHT_server_02:40:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

 if (Hours=="07")

            ^

DHT_server_02:41:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

    (Minutes=="00")

              ^

DHT_server_02:42:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

    (Seconds=="00"); 

              ^

DHT_server_02:42:18: error: expression cannot be used as a function

    (Seconds=="00"); 

                  ^

exit status 1
ISO C++ forbids comparison between pointer and integer [-fpermissive]

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

The "Client" ESP ( AKA The punched one )

#include <SPI.h>
#include <ESP8266WiFi.h>

byte button = 2;
char ssid[] = "I LOVE CATS";           
char pass[] = "v3ry$ecureP4SSW0RD!";          

unsigned long askTimer = 0;

IPAddress server(192,168,0,80);       
WiFiClient client;

void setup() {
  Serial.begin(115200);               
  WiFi.begin(ssid, pass);             
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  pinMode(button, INPUT);
}

void loop () {
  client.connect(server, 80);   
  client.println("He's still sleeping\r");
  String answer = client.readStringUntil('\r');
  if ((answer)==("Waking him up") );
     {
        if (digitalRead(button)==HIGH);
         {
           client.println("He's awake !\r");
         }
     }
  
  client.flush();
  delay(500);                  
}

I don't get any error from this one 8)

Do you have any idea of what's an "ISO C++ forbids comparison between pointer and integer [-fpermissive]" error and how to fix it ?
And what's the problem with line 33 ((Seconds=="00"); ) "error: expression cannot be used as a function ?"

Thank you !

With this library NTPClient/NTPClient.h at master · arduino-libraries/NTPClient · GitHub

The .getHours() .getMinutes() .getSeconds() functions return int

//char Hours = timeClient.getHours();
//char Minutes = timeClient.getMinutes();
//char Seconds = timeClient.getSeconds();
int Hours = timeClient.getHours();
int Minutes = timeClient.getMinutes();
int Seconds = timeClient.getSeconds();

Then the conditional statement needs to be changed to reflect this

 //if (Hours == "07")
  // (Minutes == "00")
  // (Seconds == "00");
  if (Hours == 7 && Minutes == 0 && Seconds == 0)//;
  {

With these changes the code compiles but I have not done any testing.

This makes more sens !
I didn't now about this logical AND (&&) thing, very useful and a lot cleaner !

The code compiles perfectly with the added librairy, I'll try it as soon as I get the components !

Thank you very much

Soooooooooooooo... i received the components, made a circuit board out of perfboard ( see beautiful schem linked :stuck_out_tongue: ) flashed the programs using this adapter and... nothing happened, the red and blue LED of the ESP stayed on after boot. So I checked my network to see if they were connected, nada ! Not a sign of life ! After a few tests, I found out that they connect to the network perfectly if I power them up via the usb adapter, sign that the code seems to be working... So the problem seems to be the circuitboards I made, checked all the wiring and possible shortcut with a multimeter, nothing abnormal !
So I'm here strugling since a few hours trying to find the answer.

Some of the things I tried :
-use a PSU that can deliver more wattage (right now I'm using a 5V 2.1A, more than enough in theory)
-reflash the code
-update firmware
-use other different ESP ( I have 5 of them, same result for each )
-check the wiring (did it aprox. 248249 times on each board)
-check for any shortcuts (nop, none of those)
-check for bad soldering (I'm not that bad at soldering :P, everything was connecting OK)
-And a few other tricks from the internet I can't remember, no results there

So the problem, from where I stand, seems to be with the circuit board layout, but what exactly I don't know ! Any ideas ?

Thanks a lot !

@carlitototo I just saw this thread, as i'm interested to make something similar.

For ESP-01 to work you need to connect pin 4 (CH-PD) to 3.3v. If you look closely to the back of the adapter you will see that it does the same thing (VCC and CH-PD are connected).
Also, if you use that adapter, make sure you connect GPIO0 to GND when you upload the sketch. I had to modify my adapter to make this easier. (see the pics below).

Please keep me posted with your progress :).