hi i have a scketch for esp8266 and does not fit to my wemos d1-r2

hi i have a scketch for esp8266 and does not fit to my wemos d1-r2
i now for you is it a piece of cake

i post the sketch pleas tell me somthing

/*

ESP8266 library

When you use with UNO board, uncomment the follow line in uartWIFI.h.

#define UNO

When you use with MEGA board, uncomment the follow line in uartWIFI.h.

#define MEGA

Connection:

When you use it with UNO board, the connection should be like these:

ESP8266_TX->(your softserial receive pin)

ESP8266_RX->1K resistor->(your softserial transmit pin)

ESP8266_CH_PD->3.3V

ESP8266_VCC->3.3V

ESP8266_GND->GND

When you use it with MEGA board, the connection should be like these:

ESP8266_TX->RX1(D19)

ESP8266_RX->TX1(D18)

ESP8266_CH_PD->3.3V

ESP8266_VCC->3.3V

ESP8266_GND->GND

When you want to output the debug information, please use DebugSerial. For example,

DebugSerial.println("hello");

Note: The size of message from ESP8266 is too big for arduino sometimes, so the library can't receive the whole buffer because

the size of the hardware serial buffer which is defined in HardwareSerial.h is too small.

Open the file from \arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.h.

See the follow line in the HardwareSerial.h file.

#define SERIAL_BUFFER_SIZE 64

The default size of the buffer is 64. Change it into a bigger number, like 256 or more.

*/

#define SSID "mats"
#define PASSWORD "6942589705"

#include "uartWIFIUNO.h"

#include <SoftwareSerial.h>

WIFIUNO wifi;

extern int chlID; //client id(0-4)

int sprinkler = 5;
int LED2 = 6;

extern int chlID;

void setup()

{

pinMode(sprinkler,OUTPUT);
digitalWrite(sprinkler,HIGH); //pullup to turn off.

pinMode(LED2,OUTPUT);
digitalWrite(LED2,LOW);

wifi.begin();

bool b = wifi.Initialize(STA, SSID, PASSWORD);

if(!b)

{

DebugSerial.println("Init error");

}

delay(8000); //make sure the module can have enough time to get an IP address

String ipstring = wifi.showIP();

DebugSerial.println(ipstring); //show the ip address of module

delay(2000);

wifi.confMux(1);

delay(100);

if(wifi.confServer(1,8080))

DebugSerial.println("Server is set up");

}

void loop()

{

char buf[100];

int iLen = wifi.ReceiveMessage(buf);

if(iLen > 0)

{

DebugSerial.println(buf);

if (strstr(buf, "HELLO") != NULL)

{

digitalWrite(sprinkler,LOW);

DebugSerial.println("GOT HELLO");
if(wifi.Send(chlID,"HELLO from Arduino!\r\n"))
DebugSerial.println("Message sent okay.");

}

if (strstr(buf, "CH0ON") != NULL)

{

digitalWrite(sprinkler,LOW);

DebugSerial.println("CH0ON");
wifi.Send(chlID,"Sprinkler ON\r\n");

}

if (strstr(buf, "CH0OFF") != NULL)

{

digitalWrite(sprinkler,HIGH);

DebugSerial.println("CH0OFF");
wifi.Send(chlID,"Sprinkler OFF\r\n");

}

if (strstr(buf, "CH1ON") != NULL)

{

digitalWrite(LED2,HIGH);

DebugSerial.println("CH1ON");

}

if (strstr(buf, "CH1OFF") != NULL)

{

digitalWrite(LED2,LOW);

DebugSerial.println("CH1OFF");

}

}

}

the erros is

C:\Users\mats\Desktop\my project\SprinklerControl-master\ESP8266_RelayBoard\ESP8266_RelayBoard.ino:96:25: fatal error: uartWIFIUNO.h: No such file or directory

#include "uartWIFIUNO.h"

^

compilation terminated.

exit status 1
Error compiling for board WeMos D1 R2 & mini.

C:\Users\mats\Desktop\my project\SprinklerControl-master\ESP8266_RelayBoard\ESP8266_RelayBoard.ino:96:25: fatal error: uartWIFIUNO.h: No such file or directory

#include "uartWIFIUNO.h"

I fail to see how this message relates to whether or not the sketch fits your wemos-which-isn't-really-an-Arduino.

PaulS:
I fail to see how this message relates to whether or not the sketch fits your wemos-which-isn't-really-an-Arduino.

how about now ?

/*

ESP8266 library

When you use with UNO board, uncomment the follow line in uartWIFI.h.

#define UNO

When you use with MEGA board, uncomment the follow line in uartWIFI.h.

#define MEGA

Connection:

When you use it with UNO board, the connection should be like these:

ESP8266_TX->(your softserial receive pin)

ESP8266_RX->1K resistor->(your softserial transmit pin)

ESP8266_CH_PD->3.3V

ESP8266_VCC->3.3V

ESP8266_GND->GND

When you use it with MEGA board, the connection should be like these:

ESP8266_TX->RX1(D19)

ESP8266_RX->TX1(D18)

ESP8266_CH_PD->3.3V

ESP8266_VCC->3.3V

ESP8266_GND->GND

When you want to output the debug information, please use DebugSerial. For example,

DebugSerial.println("hello");

Note: The size of message from ESP8266 is too big for arduino sometimes, so the library can't receive the whole buffer because

the size of the hardware serial buffer which is defined in HardwareSerial.h is too small.

Open the file from \arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.h.

See the follow line in the HardwareSerial.h file.

#define SERIAL_BUFFER_SIZE 64

The default size of the buffer is 64. Change it into a bigger number, like 256 or more.

*/

#define SSID "yourssid"
#define PASSWORD "yourpassword"

#include "uartWIFIUNO.h"

#include <SoftwareSerial.h>

WIFIUNO wifi;

extern int chlID; //client id(0-4)

int sprinkler = 5;
int LED2 = 6;

extern int chlID;

void setup()

{

pinMode(sprinkler,OUTPUT);
digitalWrite(sprinkler,HIGH); //pullup to turn off.

pinMode(LED2,OUTPUT);
digitalWrite(LED2,LOW);

wifi.begin();

bool b = wifi.Initialize(STA, SSID, PASSWORD);

if(!b)

{

DebugSerial.println("Init error");

}

delay(8000); //make sure the module can have enough time to get an IP address

String ipstring = wifi.showIP();

DebugSerial.println(ipstring); //show the ip address of module

delay(2000);

wifi.confMux(1);

delay(100);

if(wifi.confServer(1,8080))

DebugSerial.println("Server is set up");

}

void loop()

{

char buf[100];

int iLen = wifi.ReceiveMessage(buf);

if(iLen > 0)

{

DebugSerial.println(buf);

if (strstr(buf, "HELLO") != NULL)

{

digitalWrite(sprinkler,LOW);

DebugSerial.println("GOT HELLO");
if(wifi.Send(chlID,"HELLO from Arduino!\r\n"))
DebugSerial.println("Message sent okay.");

}

if (strstr(buf, "CH0ON") != NULL)

{

digitalWrite(sprinkler,LOW);

DebugSerial.println("CH0ON");
wifi.Send(chlID,"Sprinkler ON\r\n");

}

if (strstr(buf, "CH0OFF") != NULL)

{

digitalWrite(sprinkler,HIGH);

DebugSerial.println("CH0OFF");
wifi.Send(chlID,"Sprinkler OFF\r\n");

}

if (strstr(buf, "CH1ON") != NULL)

{

digitalWrite(LED2,HIGH);

DebugSerial.println("CH1ON");

}

if (strstr(buf, "CH1OFF") != NULL)

{

digitalWrite(LED2,LOW);

DebugSerial.println("CH1OFF");

}

}

}

Maybe have a look at this article:

PaulS:
I fail to see how this message relates to whether or not the sketch fits your wemos-which-isn't-really-an-Arduino.

sorry i misunderstand what you said

Dan95:
Maybe have a look at this article:

http://www.instructables.com/id/Programming-the-WeMos-Using-Arduino-SoftwareIDE/

than you dan95 for your interest bus this is for beginners with wemos

what I want is to change the code for you can use it to my wemos

If you have a size 10 boot and a size 14 foot, does it matter whether it is snowing?

You claim that the code won't fit on your device, for some definition of fit, when the code won't even compile. When the code won't compile, you do NOT get any measure of size, so you have nothing on which to base a claim that "it doesn't fit".

PaulS:
If you have a size 10 boot and a size 14 foot, does it matter whether it is snowing?

You claim that the code won't fit on your device, for some definition of fit, when the code won't even compile. When the code won't compile, you do NOT get any measure of size, so you have nothing on which to base a claim that "it doesn't fit".

you are telling me that it used the wrong term to say my problem?

sorry for my English

the codes work for my wemos... better now ?

The problem is that the file that you try to include could not be found by the compiler. Looking at the way you have included it (using double quotes), it is more than likely supposed to be in the sketch directory. Do you have the file uartWIFIUNO.h in there? Do you have it anywhere on your computer?

And when posting code, please use code tags so it looks like your code here

sterretje:
The problem is that the file that you try to include could not be found by the compiler. Looking at the way you have included it (using double quotes), it is more than likely supposed to be in the sketch directory. Do you have the file uartWIFIUNO.h in there? Do you have it anywhere on your computer?

And when posting code, please use code tags so it looks like your code here

sterretje you are a god thanx you very much you unblock me