own wifi module
This commit is contained in:
16
main/main.c
16
main/main.c
@ -20,6 +20,7 @@
|
||||
#include "outputs.h"
|
||||
#include "inputs.h"
|
||||
#include "control.h"
|
||||
#include "wifi.h"
|
||||
|
||||
#define I2C_MASTER_SCL 19
|
||||
#define I2C_MASTER_SDA 18
|
||||
@ -65,21 +66,22 @@ void app_main(void)
|
||||
// initOutputs();
|
||||
// initInputs();
|
||||
// initSafety();
|
||||
initWifi();
|
||||
// initControl();
|
||||
initMetrics();
|
||||
// initMetrics();
|
||||
|
||||
esp_sntp_setoperatingmode(SNTP_OPMODE_POLL);
|
||||
esp_sntp_setservername(0, "10.1.0.1"); // Set first NTP server local router
|
||||
// esp_sntp_setoperatingmode(SNTP_OPMODE_POLL);
|
||||
// esp_sntp_setservername(0, "10.1.0.1"); // Set first NTP server local router
|
||||
|
||||
sntp_set_time_sync_notification_cb(time_sync_notification_cb); // Register the SNTP time sync callback
|
||||
esp_sntp_init();
|
||||
// sntp_set_time_sync_notification_cb(time_sync_notification_cb); // Register the SNTP time sync callback
|
||||
// esp_sntp_init();
|
||||
|
||||
while (1)
|
||||
{
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
// Print the current time
|
||||
print_current_time();
|
||||
// print_current_time();
|
||||
|
||||
ESP_LOGI(TAG, "SNTP Server 0 reachability: %i", esp_sntp_getreachability(0));
|
||||
// ESP_LOGI(TAG, "SNTP Server 0 reachability: %i", esp_sntp_getreachability(0));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user