Re: WIFI Cloud and WIFI Attachment on 2 RA plusses
Posted: Wed Aug 23, 2017 12:01 pm
Getting this error on the code generated...
Code: Select all
Compiling code for RA_PLUS board
firmware.ino:29:26: error: 'MQTTServer' was not declared in this scope
PubSubClient CloudClient(MQTTServer, MQTTPORT, mqttcallback, mqttclient);
^
firmware.ino:29:38: error: 'MQTTPORT' was not declared in this scope
PubSubClient CloudClient(MQTTServer, MQTTPORT, mqttcallback, mqttclient);
^
firmware.ino: In function 'void loop()':
firmware.ino:52:22: error: 'WIFI_SSID' was not declared in this scope
Serial.println(WIFI_SSID); // print the network name (SSID);
^
firmware.ino:53:33: error: 'WIFI_PASS' was not declared in this scope
if (WiFi.begin(WIFI_SSID, WIFI_PASS) == WL_CONNECTED)
^
firmware.ino:128:38: error: 'PortalServer' was not declared in this scope
if (portalclient.connect(PortalServer, 80)) {
^
firmware.ino:152:40: error: 'CLOUD_USERNAME' was not declared in this scope
char pub_buffer[sizeof(CLOUD_USERNAME) + 5];
^
firmware.ino:153:25: error: 'pub_buffer' was not declared in this scope
sprintf(pub_buffer, "%s/out", CLOUD_USERNAME);
^
firmware.ino:189:30: error: 'CLOUD_USERNAME' was not declared in this scope
char sub_buffer[sizeof(CLOUD_USERNAME) + 6];
^
firmware.ino:193:15: error: 'sub_buffer' was not declared in this scope
sprintf(sub_buffer, "RA-%s", CLOUD_USERNAME);
^
firmware.ino:194:59: error: 'CLOUD_PASSWORD' was not declared in this scope
if (CloudClient.connect(sub_buffer, CLOUD_USERNAME, CLOUD_PASSWORD))
^
firmware.ino: In function 'void wdt_initialize()':
firmware.ino:258:3: error: 'GCLK' was not declared in this scope
GCLK->GENDIV.reg = GCLK_GENDIV_ID(2) | GCLK_GENDIV_DIV(4);
^
firmware.ino:258:38: error: 'GCLK_GENDIV_ID' was not declared in this scope
GCLK->GENDIV.reg = GCLK_GENDIV_ID(2) | GCLK_GENDIV_DIV(4);
^
firmware.ino:258:59: error: 'GCLK_GENDIV_DIV' was not declared in this scope
GCLK->GENDIV.reg = GCLK_GENDIV_ID(2) | GCLK_GENDIV_DIV(4);
^
firmware.ino:259:40: error: 'GCLK_GENCTRL_ID' was not declared in this scope
GCLK->GENCTRL.reg = GCLK_GENCTRL_ID(2) |
^
firmware.ino:260:23: error: 'GCLK_GENCTRL_GENEN' was not declared in this scope
GCLK_GENCTRL_GENEN |
^
firmware.ino:261:23: error: 'GCLK_GENCTRL_SRC_OSCULP32K' was not declared in this scope
GCLK_GENCTRL_SRC_OSCULP32K |
^
firmware.ino:262:23: error: 'GCLK_GENCTRL_DIVSEL' was not declared in this scope
GCLK_GENCTRL_DIVSEL;
^
firmware.ino:264:23: error: 'GCLK_CLKCTRL_ID_WDT' was not declared in this scope
GCLK->CLKCTRL.reg = GCLK_CLKCTRL_ID_WDT |
^
firmware.ino:265:23: error: 'GCLK_CLKCTRL_CLKEN' was not declared in this scope
GCLK_CLKCTRL_CLKEN |
^
firmware.ino:266:23: error: 'GCLK_CLKCTRL_GEN_GCLK2' was not declared in this scope
GCLK_CLKCTRL_GEN_GCLK2;
^
firmware.ino: In function 'void wdt_enable()':
firmware.ino:271:3: error: 'WDT' was not declared in this scope
WDT->CTRL.reg &= ~WDT_CTRL_ENABLE;
^
firmware.ino:271:21: error: 'WDT_CTRL_ENABLE' was not declared in this scope
WDT->CTRL.reg &= ~WDT_CTRL_ENABLE;
^
firmware.ino:273:39: error: 'WDT_CONFIG_PER' was not declared in this scope
WDT->CONFIG.reg = WDT_CONFIG_PER(0xA); // 0xA = 8192 ms
^
firmware.ino:275:24: error: 'WDT_INTENCLR_EW' was not declared in this scope
WDT->INTENCLR.reg |= WDT_INTENCLR_EW;
^
firmware.ino: In function 'void wdt_disable()':
firmware.ino:282:3: error: 'WDT' was not declared in this scope
WDT->CTRL.reg &= ~WDT_CTRL_ENABLE;
^
firmware.ino:282:21: error: 'WDT_CTRL_ENABLE' was not declared in this scope
WDT->CTRL.reg &= ~WDT_CTRL_ENABLE;
^
firmware.ino: In function 'void wdt_reset()':
firmware.ino:288:3: error: 'WDT' was not declared in this scope
WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY;
^
firmware.ino:288:20: error: 'WDT_CLEAR_CLEAR_KEY' was not declared in this scope
WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY;
^
exit status 1
Progress: 41.38%
Your code has some errors and couldn't be compiled.
Please fix the errors above and try again.