aboutsummaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
new file mode 100644
index 0000000..e3e3b92
--- /dev/null
+++ b/main/main.cpp
@@ -0,0 +1,25 @@
+#include <stdio.h>
+
+#include "config.h"
+
+#include "pico/stdlib.h"
+#include "pico/cyw43_arch.h"
+
+int main() {
+ stdio_init_all();
+
+ if (cyw43_arch_init_with_country(CYW43_COUNTRY_UK)) {
+ printf("failed to initialize\n");
+ return 1;
+ }
+ printf("initialised\n");
+
+ cyw43_arch_enable_sta_mode();
+
+ if (cyw43_arch_wifi_connect_timeout_ms(CONF_NET_SSID, CONF_NET_PASS, CYW43_AUTH_WPA2_AES_PSK, 10000)) {
+ printf("failed to connect\n");
+ return 1;
+ }
+ printf("connected\n");
+}
+