This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/SourceCode/arduino/src/main.cpp

30 lines
526 B
C++
Raw Normal View History

2022-04-10 14:38:03 +02:00
#include <Arduino.h>
2022-04-10 20:46:54 +02:00
#include "theSecrets.h"
#include "Firewall.h"
#include "esp32-hal-log.h"
const char *esp_ip_address;
ESPFirewall *firewall;
void setup_wifi()
{
log_i("Attempting to connect to WPA SSID: %s", ssid);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, psk);
while (WiFi.status() != WL_CONNECTED)
{
delay(1000);
}
esp_ip_address = WiFi.localIP().toString().c_str();
log_i("Connected, IP Address: %s", esp_ip_address);
}
2022-04-10 14:38:03 +02:00
void setup()
{
2022-04-10 15:55:42 +02:00
setup_wifi();
2022-04-10 20:46:54 +02:00
firewall = new ESPFirewall;
2022-04-10 14:38:03 +02:00
}
void loop()
{
}