Toyomasa Watarai / Mbed OS mbed-cloud-example_WiFi_ESP32

Fork of mbed-cloud-example_GR-LYCHEE by Renesas

Revision:
14:34eab7c4e26d
Parent:
13:feeaccc4717f
Child:
15:a0fb0c1c32a0
--- a/main.cpp	Mon Aug 20 02:57:04 2018 +0000
+++ b/main.cpp	Tue Sep 18 07:21:42 2018 +0000
@@ -22,9 +22,6 @@
 #include "FATFileSystem.h"
 #include "ESP32Interface.h"
 
-#define SSID "SSID"
-#define PASSWORD "PASSWORD"
-
 // An event queue is a very useful structure to debounce information between contexts (e.g. ISR and normal threads)
 // This is great because things such as network operations are illegal in ISR, so updating a resource in a button's fall() function is not allowed
 EventQueue eventQueue;
@@ -116,7 +113,7 @@
     printf("Connecting to the network using Wi-Fi...\n");
 
     // Connect to the internet (DHCP is expected to be on)
-    nsapi_error_t status = net.connect(SSID, PASSWORD, NSAPI_SECURITY_WPA_WPA2);
+    nsapi_error_t status = net.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD, NSAPI_SECURITY_WPA_WPA2);
 
     if (status != 0) {
         printf("Connecting to the network failed %d!\n", status);