Go Down

Topic: Wifi Meguno link <functional> error (Read 181 times) previous topic - next topic

JasonBoyd

Dec 06, 2017, 09:46 pm Last Edit: Dec 06, 2017, 10:09 pm by JasonBoyd
Im using a program called meguno link to at as a GUI.

Im following a tutorial on the site to use UDP and wifi.link below
https://www.megunolink.com/documentation/connecting/udp-connections/  

Im using their sample code to just test the setup.

Code: [Select]
#include "DNSServer.h"
#include "ESP8266WebServer.h"
#include "WiFiManager.h"
#include "ESP8266WiFi.h"
#include "WiFiUdp.h"
 
#include "MegunoLink.h"
 
const int SourcePort = 52790;
const int DestinationPort = 52791;
const IPAddress DestinationIp(255, 255, 255, 255);
 
WiFiManager ConnectionManager;
WiFiUDP UdpConnection;
 
void setup()
{
  Serial.begin(9600);
  Serial.println("WiFi Test");
 
  Serial.println("Connecting");
  ConnectionManager.autoConnect();
  Serial.println("Connected");
  
  UdpConnection.begin(SourcePort);
}
 
void loop()
{
  // Send a message
  UdpConnection.beginPacket(DestinationIp, DestinationPort);
  UdpConnection.println("A wireless hello");
  UdpConnection.endPacket();
 
  // Send data for plotting
  UdpConnection.beginPacket(DestinationIp, DestinationPort);
  TimePlot Plot("ADC", UdpConnection);
  Plot.SendData("A0", analogRead(A0));
  UdpConnection.endPacket();
 
  delay(500); // ms
}


The libraries is where I'm having the problem, when I add the ESP8266WebServer.h and compile I'm getting an error that says,

C:\Users\Home\Documents\Arduino\libraries\ESP8266WebServer\src/ESP8266WebServer.h:27:22: fatal error: functional: No such file or directory

#include <functional>

                   ^

compilation terminated.

I don't know what to do with about this, I know its a strange problem but does anyone know how to solve this.

Thanks


pert

What do you have selected in the Tools > Board menu?

JasonBoyd

What do you have selected in the Tools > Board menu?
Arduino/Genuino uno


when i select the generic esp8266 and compile I get this error

GetFileAttributesEx C:\Users\Home\AppData\Local\Temp\arduino_cache_765812: The system cannot find the file specified.

Error compiling for board Generic ESP8266 Module.

pert

Those libraries are specifically written for directly programming ESP8266 and can't be used with the Uno, thus the first error.

The second error is caused by some glitch in the Arduino IDE and has nothing to do with your code. Try exiting all Arduino IDE windows and then restart the IDE and try again.

Go Up