forked from esphome/esphome
-
Notifications
You must be signed in to change notification settings - Fork 2
/
dummy_main.cpp
34 lines (27 loc) · 1.03 KB
/
dummy_main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Dummy main.cpp file for the PlatformIO project in the git repository.
// Primarily used to get IDE integration working (so the contents here don't
// matter at all, as long as it compiles).
// Not used during runtime nor for CI.
#include <esphome/core/application.h>
#include <esphome/components/logger/logger.h>
#include <esphome/components/wifi/wifi_component.h>
#include <esphome/components/ota/ota_component.h>
#include <esphome/components/gpio/switch/gpio_switch.h>
using namespace esphome;
void setup() {
App.pre_setup("livingroom", __DATE__ ", " __TIME__, false);
auto *log = new logger::Logger(115200, 512); // NOLINT
log->pre_setup();
log->set_uart_selection(logger::UART_SELECTION_UART0);
App.register_component(log);
auto *wifi = new wifi::WiFiComponent(); // NOLINT
App.register_component(wifi);
wifi::WiFiAP ap;
ap.set_ssid("Test SSID");
ap.set_password("password1");
wifi->add_sta(ap);
auto *ota = new ota::OTAComponent(); // NOLINT
ota->set_port(8266);
App.setup();
}
void loop() { App.loop(); }