How to use Arduino+esp-01 to get the time using NTP

  • I’m connecting to WiFi using the BlynkSimpleShieldEsp8266.h library, but I can’t use NTP.
    It’s giving me the following

  • error: ‘PinStatus’ does not name a type
    static PinStatus digitalRead(uint8_t pin);

Without seeing your code it’s impossible to say why you are getting this error, but why are you getting the time from an NTP server rather than the Blynk server?
You’d be far better using Blynk’s RTC functionality.

Pete.

[Unformatted code removed by moderator]

I need the hours to help control the lighting in a greenhouse, to get the time for the day for it to turn on. I don’t have the RTC module, I wanted to get this value directly from the internet, but I can’t use the NTPClient.h library. If you can help with a solution that doesn’t require a module, I would be grateful.

please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly. Triple backticks look like this: ```

I’m aware of that.

That’s what you’d be doing if you used the Blynk RTC functionality. You should read the Blynk RTC documentation.

When you post code, serial monitor output, compiler error messages etc to the forum it’s important to use triple backticks at the beginning and end so that it displays correctly - otherwise it will be deleted.

Pete.