ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
example_ntp.cpp File Reference
#include <Arduino.h>
#include <NTPClient.h>
#include <WiFi.h>

Go to the source code of this file.

Macros

#define SERIAL_BAUD   115200
 

Functions

NTPClient timeClient (ntpUDP)
 
void setup ()
 
void loop ()
 

Variables

const char ssid [] = "Enter-Your-SSID"
 
const char pass [] = "Enter-Your-Password"
 
WiFiUDP ntpUDP
 
String currentTime
 

Macro Definition Documentation

◆ SERIAL_BAUD

#define SERIAL_BAUD   115200

Baud rate for serial interface

Definition at line 16 of file example_ntp.cpp.

Function Documentation

◆ loop()

void loop ( )

Definition at line 61 of file example_ntp.cpp.

References currentTime, and timeClient().

◆ setup()

void setup ( )

Definition at line 26 of file example_ntp.cpp.

References pass, ssid, and timeClient().

◆ timeClient()

NTPClient timeClient ( ntpUDP  )

Referenced by loop(), and setup().

Variable Documentation

◆ currentTime

String currentTime

Definition at line 24 of file example_ntp.cpp.

Referenced by loop().

◆ ntpUDP

WiFiUDP ntpUDP

Definition at line 21 of file example_ntp.cpp.

◆ pass

const char pass[] = "Enter-Your-Password"

Definition at line 19 of file example_ntp.cpp.

Referenced by setup().

◆ ssid

const char ssid[] = "Enter-Your-SSID"

Definition at line 18 of file example_ntp.cpp.

Referenced by setup().