I'm new to this forum and programming in general so forgive me in advance if my questions seem a bit basic.
Before I begin detailing my problem, let me explain what I'm doing. My goal is to create a PIR motion sensor located in a hallway and linked to and EasyIoT server. This is both for utility and to learn along the way. The idea is to then use Pushbullet, (and a tutorial that I found here on the forums) to send my phone and computer a push notification when there is motion. (Doesn't seem impossible to me...)
Because of the location of the sensor, (it must be small/somewhat hidden) and cannot use a standard wall plug as power source. No problem, I've figured a solution to that using a Lipo and a PowerBoost module.
The PIR sensor is 5V input with 3.3V logic. My reasoning behind using the feather was that it would solve many things at once: FDTI, charger for my lipo, ESP8266 module, 3.3v logic, and 5V out (for the PIR). Again I want to keep it as small as possible.
Now here comes my issue/error. I am programming the Feather using Arduino IDE, having set my board to "Generic ESP8266 Module" as instructed in the manual. I am not too familiar with coding, so I started looking for examples. I found this on iot-playground which I think should be perfect (correct me if I'm wrong):
http://iot-playground.com/blog/2-uncategorised/42-esp8266-wifi-pir-motion-sensor-arduino-ide
Below is my code and the error following when I tried to upload. In my searching the web I found the biggest cause to be missing libraries, but those are installed in the same location as the default libraries.
Again, I am very new to this, any help, explanations, tutorials, etc, would be greatly appreciated.
Thanks,
Luigi
/*
Created by Igor Jarc
See http://iot-playground.com for details
Please use community forum on website do not contact author directly
External libraries:
- https://github.com/adamvr/arduino-base64
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
*/
#include <ESP8266WiFi.h>
#include <Base64.h>
//AP definitions
#define AP_SSID "AeroWifi"
#define AP_PASSWORD "xxxxx"
// EasyIoT server definitions
#define EIOT_USERNAME "xxxxxxx"
#define EIOT_PASSWORD "xxxxxxxx"
#define EIOT_IP_ADDRESS "xxx.xxx.x.xxx"
#define EIOT_PORT "80"
#define EIOT_NODE "N20S0"
#define INPUT_PIN 2
#define USER_PWD_LEN 40
char unameenc[USER_PWD_LEN];
bool oldInputState;
void setup() {
Serial.begin(115200);
pinMode(INPUT_PIN, INPUT);
wifiConnect();
char uname[USER_PWD_LEN];
String str = String(EIOT_USERNAME)+":"+String(EIOT_PASSWORD);
str.toCharArray(uname, USER_PWD_LEN);
memset(unameenc,0,sizeof(unameenc));
base64_encode(unameenc, uname, strlen(uname));
oldInputState = !digitalRead(INPUT_PIN);
}
void loop() {
int inputState = digitalRead(INPUT_PIN);;
if (inputState != oldInputState)
{
sendInputState(inputState);
oldInputState = inputState;
}
}
void wifiConnect()
{
Serial.print("Connecting to AP");
WiFi.begin(AP_SSID, AP_PASSWORD);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
}
void sendInputState(bool inputState)
{
WiFiClient client;
while(!client.connect(EIOT_IP_ADDRESS, EIOT_PORT)) {
Serial.println("connection failed");
wifiConnect();
}
String url = "";
String command = "";
if (inputState)
command = "ControlOn";
else
command = "ControlOff";
url = "/Api/EasyIoT/Control/Module/Virtual/"+ String(EIOT_NODE) + "/"+command; // generate EasIoT server node URL
Serial.print("POST data to URL: ");
Serial.println(url);
client.print(String("POST ") + url + " HTTP/1.1\r\n" +
"Host: " + String(EIOT_IP_ADDRESS) + "\r\n" +
"Connection: close\r\n" +
"Authorization: Basic " + unameenc + " \r\n" +
"Content-Length: 0\r\n" +
"\r\n");
delay(100);
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
Serial.println();
Serial.println("Connection closed");
}
AND THE ERROR:
Arduino: 1.6.7 (Windows 10), Board: "Generic ESP8266 Module, Serial, 80 MHz, 40MHz, QIO, 115200, 512K (64K SPIFFS), nodemcu, Disabled, None"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Luigi\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Luigi\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Luigi\Documents\Arduino\libraries" -fqbn=esp8266:esp8266:generic:UploadTool=esptool,CpuFrequency=80,FlashFreq=40,FlashMode=qio,UploadSpeed=115200,FlashSize=512K64,ResetMethod=nodemcu,Debug=Disabled,DebugLevel=None____ -ide-version=10607 -build-path "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Luigi\Documents\Arduino\IoT\Motion_Sensor\sketch_mar01a\sketch_mar01a.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Luigi\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Luigi\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Luigi\Documents\Arduino\libraries" -fqbn=esp8266:esp8266:generic:UploadTool=esptool,CpuFrequency=80,FlashFreq=40,FlashMode=qio,UploadSpeed=115200,FlashSize=512K64,ResetMethod=nodemcu,Debug=Disabled,DebugLevel=None____ -ide-version=10607 -build-path "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Luigi\Documents\Arduino\IoT\Motion_Sensor\sketch_mar01a\sketch_mar01a.ino"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\sketch\sketch_mar01a.ino.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\sketch\sketch_mar01a.ino.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\ESP8266WiFi.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\ESP8266WiFiAP.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\ESP8266WiFiSTA.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\ESP8266WiFiScan.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\WiFiClient.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\WiFiServer.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src\WiFiUdp.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\sketch\sketch_mar01a.ino.cpp" -o "nul"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\sketch\sketch_mar01a.ino.cpp" -o "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino5/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10607 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\variants\generic" "-IC:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src" "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\sketch\sketch_mar01a.ino.cpp" -o "C:\Users\Luigi\AppData\Local\Temp\buildc1caefdb854a46d4ea9ec9124efe2f41.tmp\sketch\sketch_mar01a.ino.cpp.o"
C:\Users\Luigi\Documents\Arduino\IoT\Motion_Sensor\sketch_mar01a\sketch_mar01a.ino: In function 'void setup()':
sketch_mar01a:39: error: 'wifiConnect' was not declared in this scope
wifiConnect();
^
sketch_mar01a:45: error: 'base64_encode' was not declared in this scope
base64_encode(unameenc, uname, strlen(uname));
^
C:\Users\Luigi\Documents\Arduino\IoT\Motion_Sensor\sketch_mar01a\sketch_mar01a.ino: In function 'void loop()':
sketch_mar01a:55: error: 'sendInputState' was not declared in this scope
sendInputState(inputState);
^
C:\Users\Luigi\Documents\Arduino\IoT\Motion_Sensor\sketch_mar01a\sketch_mar01a.ino: In function 'void sendInputState(bool)':
sketch_mar01a:77: error: invalid conversion from 'const char*' to 'uint16_t {aka short unsigned int}' [-fpermissive]
while(!client.connect(EIOT_IP_ADDRESS, EIOT_PORT)) {
^
In file included from C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from C:\Users\Luigi\Documents\Arduino\IoT\Motion_Sensor\sketch_mar01a\sketch_mar01a.ino:13:
C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi\src/WiFiClient.h:48:15: error: initializing argument 2 of 'virtual int WiFiClient::connect(const char*, uint16_t)' [-fpermissive]
virtual int connect(const char *host, uint16_t port);
^
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\Luigi\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\ESP8266WiFi
exit status 1
'wifiConnect' was not declared in this scope